[NEXT] Cannot start nuxt: Cannot find module 'node_modules/vue-i18n/dist/vue-i18n.mjs'
See original GitHub issueHi,
I’m currently using vue-i18n as a plugin in a Nuxt 3 project but I would like to switch to @nuxtjs/i18n as soon as possible. I tried to installed the alpha version but as soon as I declare the module in nuxt.config.js, I’ve got an error when I do npm run dev.
Cannot find module '.../node_modules/vue-i18n/dist/vue-i18n.mjs'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:983:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:976:15)
at resolveExports (node:internal/modules/cjs/loader:493:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:533:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at Function._resolve [as resolve] (node_modules/jiti/dist/jiti.js:1:243257)
at resolveModule (node_modules/@nuxt/kit/dist/index.mjs:261:29)
at setupAlias (node_modules/@nuxtjs/i18n/dist/module.mjs:25:36)
at setup (node_modules/@nuxtjs/i18n/dist/module.mjs:541:11)
at async Object.normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:642:5)
at async installModule (node_modules/nuxt/node_modules/@nuxt/kit/dist/index.mjs:456:3)
at async initNuxt (node_modules/nuxt/dist/index.mjs:1606:7)
at async load (node_modules/nuxi/dist/chunks/dev.mjs:6778:9)
at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6828:5)
at async _main (node_modules/nuxi/dist/cli.mjs:50:20)
Indeed there is no such file in node_modules/vue-i18n/dist/ Any help will be appreciated!
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:20
Top Results From Across the Web
Cannot find module 'node_modules/vue-i18n/dist/vue ... - GitHub
Hi, I'm currently using vue-i18n as a plugin in a Nuxt 3 project but I would like to switch to @nuxtjs/i18n ... [NEXT]...
Read more >Error: Cannot find module nuxt.js, why my app don't start?
Try and install nuxt-start package. This is what I used to solve a very similar challenge (On Production).
Read more >Installation | Nuxt Image
Using image module in your Nuxt project is only one command away.
Read more >nuxt-start - npm
Start Nuxt Application in production mode. Installation. npm install --save nuxt-start. Add/Update your "start" script into your package ...
Read more >Nuxt 3 integration - Vue I18n - Intlify
This Nuxt3 application is set up in this tutorial doesn't support advanced i18n, ... Next, create a Nuxt plugin file to implement for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kazupon No worries for the delay and thank you but you closed this thread based on the second error I mentioned. I tried again on a new project and yes the
Cannot read properties of undefined (reading 'path')error is gone but not theCannot find module '.../node_modules/vue-i18n/dist/vue-i18n.mjs'I declared for this thread when trying to install @nuxti18n in a project already working.I can’t share my project but maybe @ahoiroman , @LePtiDev or @smartfox87 have an example they can share please?
Otherwise I’ll try to reproduce on a fresh project when I have some time, but I just saw that in a new project the vue-i18n.msj is there but not on my current project even if I’m doing the same command and config!
FYI as written above, we were NOT using
pnpm, justnpm. I’ll have a look at the fix asap!