【问题标题】:I am facing "npm run dev" missing script issues. How to resolve it?I am facing \"npm run dev\" missing script issues. How to resolve it?
【发布时间】:2022-12-02 04:41:45
【问题描述】:

I am currently in the folder E:\Learn\app-code-vue

E:\Learn\app-code-vue>npm run dev
npm ERR! Missing script: "dev"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Shrikant Rana\AppData\Local\npm-cache\_logs\2022-01-24T14_
26_36_332Z-debug.log

【问题讨论】:

  • Do you mean npm run serve or npm run start? The issue stems from your package.json missing any script called dev

标签: vue.js


【解决方案1】:

See the scripts that are configured with Vue CLI 3 in the package.json file

"scripts": {
         "serve": "vue-cli-service serve",
         "build": "vue-cli-service build",
         "lint": "vue-cli-service lint"    },

so you can run by use this : npm run serve

【讨论】:

    【解决方案2】:

    Check your package.json file and see if you have dev named in your "scripts" key. This is what your package.json script tag should look like if you want to run a dev command:

    "scripts": {
        "start": "node index.js",
        "dev": "concurrently "npm run server" "npm run client""
      },
    

    【讨论】:

      【解决方案3】:

      use npm run serve

      It's working for me

      【讨论】:

        【解决方案4】:

        You may need to check if you are really in the correct folder

        【讨论】:

          猜你喜欢
          • 2022-12-19
          • 2022-12-19
          • 2022-12-02
          • 2022-12-27
          • 2022-12-19
          • 2022-12-02
          • 2022-12-02
          • 2023-02-03
          • 2022-12-19
          相关资源
          最近更新 更多