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

javascript - Npm not running in terminal vite - Stack Overflow

programmeradmin2浏览0评论

What I typed:

npm run dev

Error:

npm ERR! Missing script: "dev"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run
npm ERR! A plete log of this run can be found in:
npm ERR!  C:\Users\andre\AppData\Local\npm-cache\_logs\2021-11-12T04_58_51_898Z-debug.log

Json:

{
  "name": "port",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  "devDependencies": {
    "vite": "^2.6.4"
  },
  "dependencies": {
    "three": "^0.134.0"
  }
}

What I typed:

npm run dev

Error:

npm ERR! Missing script: "dev"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR!   npm run
npm ERR! A plete log of this run can be found in:
npm ERR!  C:\Users\andre\AppData\Local\npm-cache\_logs\2021-11-12T04_58_51_898Z-debug.log

Json:

{
  "name": "port",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  "devDependencies": {
    "vite": "^2.6.4"
  },
  "dependencies": {
    "three": "^0.134.0"
  }
}
Share Improve this question edited Jul 1, 2023 at 14:45 Penny Liu 17.6k5 gold badges86 silver badges108 bronze badges asked Nov 12, 2021 at 5:03 ykykykyk 691 gold badge1 silver badge8 bronze badges 1
  • Can you share a link to a reproduction? – tony19 Commented Nov 12, 2021 at 5:07
Add a ment  | 

1 Answer 1

Reset to default 2

Goto you project directory by cd your-project-name. run npm run dev mand and try again (In your npm mand "N" is capital). and if not work please check below link (please refer green tick answer) :

How to resolve npm run dev missing script issues?

发布评论

评论列表(0)

  1. 暂无评论