Cannot start nuxt: Cannot find module 'nuxt3'
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.14.2
- Nuxt Version:
3.0.0-rc.1
- Package Manager:
npm@8.7.0
- Builder:
vite
- User Config:
runtimeConfig
,modules
,intlify
,css
,head
,vite
- Runtime Modules:
@intlify/nuxt3@0.1.10
- Build Modules:
-
Reproduction
Describe the bug
Commands npx nuxi dev
and npx nuxi build
throws error. Error can be seen in logs
Additional context
CONFIG
import { defineNuxtConfig } from "nuxt";
export default defineNuxtConfig({
runtimeConfig: {
DATABASE_URL: process.env.DATABASE_URL,
CORAGEO_URL: process.env.CORAGEO_URL,
CORAGEO_USER: process.env.CORAGEO_USER,
CORAGEO_PASS: process.env.CORAGEO_PASS,
CORAGEO_VERBOSE: process.env.CORAGEO_VERBOSE,
ORGID: process.env.ORGID,
UPLOAD_DIR: process.env.UPLOAD_DIR,
API_URL: process.env.API_URL,
EMAIL_VERIFICATION_EXPIRATION_DAYS: process.env.EMAIL_VERIFICATION_EXPIRATION_DAYS,
PLATFORM: process.env.PLATFORM,
SESSION_LIFESPAN_MINUTES: process.env.SESSION_LIFESPAN_MINUTES,
RESET_PASS_EXPIRATION_DAYS: process.env.RESET_PASS_EXPIRATION_DAYS,
public: {
MAXSIZEMB: process.env.MAXSIZEMB,
PAYMENT_URL: process.env.PAYMENT_URL,
PAYMENT_KEY: process.env.PAYMENT_KEY,
},
},
modules: ["@intlify/nuxt3"],
intlify: {
localeDir: "locales",
vueI18n: {
globalInjection: true,
legacy: false,
locale: "sk",
},
},
css: ["@/assets/scss/app.scss"],
head: {
meta: [{ name: "viewport", content: "width=device-width, initial-scale=1" }],
},
vite: {
css: {
preprocessorOptions: {
scss: {
additionalData: "@import '@id-sk/frontend/idsk/all.scss';",
quietDeps: true,
},
},
},
},
});
PACKAGE.JSON
{
"private": true,
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"preview": "nuxi preview",
"start": "cross-env NUXT_HOST=0.0.0.0 node .output/server/index.mjs",
"format": "prettier --config .prettierrc . --write"
},
"devDependencies": {
"@intlify/nuxt3": "^0.1.10",
"cross-env": "^7.0.3",
"nuxt": "^3.0.0-rc.1",
"prettier": "^2.6.2",
"prisma": "^3.11.1"
},
"dependencies": {
"@id-sk/frontend": "^2.9.0",
"@prisma/client": "^3.11.1",
"@vue-leaflet/vue-leaflet": "^0.6.1",
"axios": "^0.26.1",
"base64-img": "^1.0.4",
"dayjs": "^1.11.0",
"elmolis-corageo": "git+ssh://git@gitlab.elmolis.sk:Urbi/IntParkCoraGeo.git#devel",
"hashids": "^2.2.10",
"leaflet": "^1.7.1",
"mustache": "^4.2.0",
"sass": "^1.49.11",
"sweetalert2": "^11.4.8"
}
}
Logs
ERROR Cannot start nuxt: Cannot find module 'nuxt3' 15:31:03
Require stack:
- /Users/enimo/Desktop/Projects/Elmolis/PortalPresov/index.js
Require stack:
- index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at Function._resolve [as resolve] (node_modules/jiti/dist/jiti.js:1:192841)
at resolveModule (node_modules/@nuxt/kit/dist/index.mjs:68:29)
at importModule (node_modules/@nuxt/kit/dist/index.mjs:90:24)
at loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:798:43)
at async load (node_modules/nuxi/dist/chunks/dev.mjs:6733:23)
at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6777:5)
at async _main (node_modules/nuxi/dist/cli.mjs:46:20)
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Cannot start nuxt: Cannot find module 'nuxt' #3060 - GitHub
Brand new project w/node 14 (nvm use 14). I also tested w/yarn and node 17 with the same results. Following the docs: How...
Read more >Error: Cannot find module nuxt.js, why my app don't start?
I´ve got this error when try to run npm run dev after installed the dependencies and i cant find why ...
Read more >nuxt3 - npm
Start using nuxt3 in your project by running `npm i nuxt3`. There are 5 other projects in the npm registry using nuxt3.
Read more >Installation - Nuxt
Here, you will find information on setting up and running a Nuxt project in 4 steps. ... To get started quickly, you can...
Read more >Nuxt 3 first steps. - ITNEXT
npx nuxi init nuxt3-app · npm install or yarn · [vite:import-analysis] Cannot read property 'uid' of undefined · yarn add -D eslint @typescript-eslint/eslint- ......
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 FreeTop 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
Top GitHub Comments
I’ve just released v0.2.0 which is supported for nuxt3 rc version. https://github.com/intlify/nuxt3/releases/tag/v0.2.0 Please check it
Have the same issue. Problem was in my custom plugins. Solved by changing nuxt3/app to nuxt/app repository.