Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Could not resolve "#build/app.config.mjs" #14833

Closed
Block81838 opened this issue Sep 7, 2022 · 2 comments
Closed

ERROR: Could not resolve "#build/app.config.mjs" #14833

Block81838 opened this issue Sep 7, 2022 · 2 comments

Comments

@Block81838
Copy link

Environment


  • Operating System: Windows_NT
  • Node Version: v18.7.0
  • Nuxt Version: 3.0.0-rc.9
  • Nitro Version: 0.5.1
  • Package Manager: npm@8.15.0
  • Builder: vite
  • User Config: css, build, vite
  • Runtime Modules: -
  • Build Modules: -

Reproduction

upgrade to nuxt@3.0.0-rc.9 and then just run npm run build

Describe the bug

I just upgraded nuxt to rc9 from rc8, and there is a error when I run npm run build

It works well after I downgrade to rc8

Additional context

No response

Logs

i Vite server warmed up in 153ms                                                                                            10:53:25
√ Nitro built in 326 ms                                                                                               nitro 10:53:25
✘ [ERROR] Could not resolve "#build/app.config.mjs"

    node_modules/nuxt/dist/app/config.mjs:3:24:
      3 │ import __appConfig from "#build/app.config.mjs";~~~~~~~~~~~~~~~~~~~~~~~

  The package import "#build/app.config.mjs" is not defined in this "imports" map:

    node_modules/nuxt/package.json:18:13:
      18 │   "imports": {
         ╵              ^

  You can mark the path "#build/app.config.mjs" as external to exclude it from the bundle, which
  will remove this error.


 ERROR  10:53:30 AM [vite] error while updating dependencies:                                                               10:53:30
Error: Build failed with 1 error:
node_modules/nuxt/dist/app/config.mjs:3:24: ERROR: Could not resolve "#build/app.config.mjs"
    at failureErrorWithLog (C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:1624:15)
    at C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:1266:28
    at runOnEndCallbacks (C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:1046:63)
    at buildResponseToResult (C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:1264:7)
    at C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:1377:14
    at C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:678:9
    at handleIncomingPacket (C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:775:9)
    at Socket.readFromStdout (C:\Users\ppp\Projects\myproject\node_modules\vite\node_modules\esbuild\lib\main.js:644:7)
    at Socket.emit (node:events:513:28)
    at Socket.emit (node:domain:489:12)
@Lyokolux
Copy link

Lyokolux commented Sep 7, 2022

Similar to #14801

@danielroe
Copy link
Member

let's track in #14801.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants