You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding resolve.alias throws an error on dev and build, Failed to resolve import "#build/plugins" from "node_modules/nuxt3/dist/app/entry.mjs". Does the file exist?
at formatError (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:42189:46)
at TransformContext.error (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:42185:19)
at normalizeUrl (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:67281:26)
at async TransformContext.transform (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:67421:57)
at async Object.transform (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:42396:30)
at async doTransform (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:56797:29)
ERROR [vite:load-fallback] Could not load (imported by node_modules/nuxt3/dist/app/entry.mjs): ENOENT: no such file or directory, open ''
This issue with an update to vue-demi prompted me to add the alias resolves
Logs
Failed to resolve import "#build/plugins" from "node_modules/nuxt3/dist/app/entry.mjs". Does the file exist? 10:49:36
at formatError (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:42189:46)
at TransformContext.error (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:42185:19)
at normalizeUrl (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:67281:26)
at async TransformContext.transform (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:67421:57)
at async Object.transform (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:42396:30)
at async doTransform (node_modules/vite/dist/node/chunks/dep-85dbaaa7.js:56797:29)
ERROR [vite:load-fallback] Could not load (imported by node_modules/nuxt3/dist/app/entry.mjs): ENOENT: no such file or directory, open '' 10:49:36
ERROR Could not load (imported by node_modules/nuxt3/dist/app/entry.mjs): ENOENT: no such file or directory, open '' 10:49:36
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
danielroe
changed the title
Failed to resolve import "#build/plugins"
Failed to resolve import "#build/plugins" when adding alias for @vue/composition-apiOct 29, 2021
I'm confused - why are you using @vue/composition-api in a vue 3 project?
This seems an issue with how Vite is merging your array and the default Nuxt aliases. For now, you should use the top level alias property rather than directly editing vite.resolve.alias: example.
Environment
Darwin
v16.11.1
3.0.0-27258294.bdbfa36
yarn@1.22.15
Vite
build
,vite
-
-
Describe the bug
Adding resolve.alias throws an error on dev and build,
Failed to resolve import "#build/plugins" from "node_modules/nuxt3/dist/app/entry.mjs". Does the file exist?
Reproduction
https://codesandbox.io/s/blissful-ellis-37b43?file=/nuxt.config.ts
Create a fresh Nuxt 3 project and copy this into your
nuxt.config.js
:Additional context
This issue with an update to vue-demi prompted me to add the alias resolves
Logs
The text was updated successfully, but these errors were encountered: