最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Error: Cannot find module nuxt.js, why my app don't start? - Stack Overflow

programmeradmin1浏览0评论

I´ve got this error when try to run npm run dev after installed the dependencies and i cant find why. Help me please. I tried some things that found around the internet but none of that worked

[email protected] dev
> nuxt

"F\plusholidays-app\node_modules\.bin\" no se reconoce o un ando interno o externo,
programa o archivo por lotes ejecutable.
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'C:\Users\anyel\Documents\src\nuxt\bin\nuxt.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Here is the package.json

{
  "name": "plusholidays-app",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "@nuxtjs/axios": "^5.13.1",
    "@nuxtjs/moment": "^1.6.1",
    "@nuxtjs/proxy": "^2.1.0",
    "apexcharts": "^3.26.0",
    "core-js": "^3.9.0",
    "js-cookie": "^2.2.1",
    "leaflet": "^1.7.1",
    "lodash.clonedeep": "^4.5.0",
    "nuxt": "^2.15.2",
    "nuxt-i18n": "^6.21.1",
    "vue-advanced-cropper": "^1.3.2",
    "vue-apexcharts": "^1.6.0",
    "vue-the-mask": "^0.11.1",
    "vue2-leaflet": "^2.6.0"
  },
  "devDependencies": {
    "@nuxtjs/vuetify": "^1.11.3",
    "babel-eslint": "^10.1.0",
    "eslint": "^7.20.0",
    "eslint-config-prettier": "^8.1.0",
    "eslint-loader": "^4.0.2",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-vue": "^7.6.0",
    "prettier": "^2.2.1"
  }
}

I really want to understand what is going on here, but I'm at a bit of a loss as to where to look next. Any suggestions?

I´ve got this error when try to run npm run dev after installed the dependencies and i cant find why. Help me please. I tried some things that found around the internet but none of that worked

[email protected] dev
> nuxt

"F\plusholidays-app\node_modules\.bin\" no se reconoce o un ando interno o externo,
programa o archivo por lotes ejecutable.
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'C:\Users\anyel\Documents\src\nuxt\bin\nuxt.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Here is the package.json

{
  "name": "plusholidays-app",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "@nuxtjs/axios": "^5.13.1",
    "@nuxtjs/moment": "^1.6.1",
    "@nuxtjs/proxy": "^2.1.0",
    "apexcharts": "^3.26.0",
    "core-js": "^3.9.0",
    "js-cookie": "^2.2.1",
    "leaflet": "^1.7.1",
    "lodash.clonedeep": "^4.5.0",
    "nuxt": "^2.15.2",
    "nuxt-i18n": "^6.21.1",
    "vue-advanced-cropper": "^1.3.2",
    "vue-apexcharts": "^1.6.0",
    "vue-the-mask": "^0.11.1",
    "vue2-leaflet": "^2.6.0"
  },
  "devDependencies": {
    "@nuxtjs/vuetify": "^1.11.3",
    "babel-eslint": "^10.1.0",
    "eslint": "^7.20.0",
    "eslint-config-prettier": "^8.1.0",
    "eslint-loader": "^4.0.2",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-vue": "^7.6.0",
    "prettier": "^2.2.1"
  }
}

I really want to understand what is going on here, but I'm at a bit of a loss as to where to look next. Any suggestions?

Share Improve this question asked Apr 7, 2021 at 0:49 anyelson espinozaanyelson espinoza 431 gold badge1 silver badge5 bronze badges 3
  • can you share your directory structure? Nuxt should be in a node_modules folder which should be generated during npm install. – devintark Commented Apr 7, 2021 at 0:57
  • Already solved it, thank you. – anyelson espinoza Commented Apr 7, 2021 at 1:41
  • 1 Edit your question or answer your own question with an answer. – kissu Commented Apr 7, 2021 at 8:04
Add a ment  | 

2 Answers 2

Reset to default 2

Try and install nuxt-start package.

This is what I used to solve a very similar challenge (On Production)

where you node_modules? C:\Users\anyel\Documents\src\nuxt\bin\nuxt.js

try path: script: './node_modules/nuxt/bin/nuxt.js',

发布评论

评论列表(0)

  1. 暂无评论