cannot import from `nuxt/app` (Package import specifier "#build/app.config.mjs" is not defined)
See original GitHub issueEnvironment
Operating System: MacOS Ventura Node Version: v16.13.0. Nuxt Version: 3.0.0-rc.9 Nitro Version: 0.5.0 Package Manager: yarn@1.22.19 Builder: webpack ( I think) User Config: Runtime Modules: “dependencies”: { “@formkit/i18n”: “^1.0.0-beta.10”, “@pinia/nuxt”: “^0.4.1”, “axios”: “^0.27.2”, “pinia”: “^2.0.21”, “pinia-plugin-persistedstate”: “^2.1.1”, “postmark”: “^3.0.1”, “swiper”: “^8.3.1”, “vue3-marquee”: “^3.0.7” } Build Modules: “devDependencies”: { “@aceforth/nuxt-netlify”: “^1.1.0”, “@formkit/nuxt”: “^1.0.0-beta.11-0dd967c”, “@iconify-json/heroicons-solid”: “^1.1.1”, “@nuxtjs/tailwindcss”: “^5.3.2”, “@tailwindcss/typography”: “^0.5.7”, “@vueuse/core”: “^9.1.1”, “@vueuse/nuxt”: “^9.1.1”, “netlify-cli”: “^11.5.1”, “nuxt”: “3.0.0-rc.9”, “unplugin-icons”: “^0.14.5” }
Reproduction
I upgrade with yarn upgrade and with yarn upgrade nuxt, then yarn upgrade --force, and then yarn upgrade --latest. I upgraded to RC.9 and a few packages that didn’t work I upgraded manually to the edge repository like formkit that needed yarn add @formkit/nuxt@next --dev .
I’will try to make a minimal reproduction, but as the project has many pages and components Im not sure if I have to recreate the whole project.
Describe the bug
When I do yarn build -> the site is completely broken it doesn’t load any page. When I do yarn dev -> the site works ok When I do yarn check -> There is 1 error
error "@pinia/nuxt#unctx#unplugin#vite@^2.3.0" doesn't satisfy found match of "vite@3.0.9"
error Found 1 errors.
Additional context
No response
Logs
[nuxt] [request error] [unhandled] [500] Package import specifier "#build/app.config.mjs" is not defined in package /Users/david/WebstormProjects/mixverde/.output/server/node_modules/nuxt/package.json imported from /Users/david/WebstormProjects/mixverde/.output/server/node_modules/nuxt/dist/app/config.mjs
at new NodeError (node:internal/errors:371:5)
at throwImportNotDefined (node:internal/modules/esm/resolve:429:9)
at packageImportsResolve (node:internal/modules/esm/resolve:778:3)
at moduleResolve (node:internal/modules/esm/resolve:924:21)
at defaultResolve (node:internal/modules/esm/resolve:1044:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)```
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:35 (12 by maintainers)
Top GitHub Comments
Please ensure you are not importing directly from
nuxt/app
but from#imports
.I bumped my dependency and I am facing this issue with
histoire
.I get:
TypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier "#build/app.config.mjs" is not defined in package node_modules/nuxt/package.json imported from node_modules/nuxt/dist/app/config.mjs
The line in question is:
import __appConfig from "#build/app.config.mjs";