欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

npm run dev error

程序员文章站 2022-03-03 08:42:29
...

Please try:

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install



windows和linux下安装时  还会能一个提示

[[email protected]_217_200_centos rap2]# npm install

> [email protected] install /usr/local/rap2/node_modules/pre-commit
> node install.js


> [email protected] postinstall /usr/local/rap2/node_modules/spawn-sync
> node postinstall

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})


源自*的一个解答:
fsevents is an API available only on OSX. So if you're using another OS like Windows as do I.
Normally software that wants to use fsevents will provide an alternative or make it optional as your message reads. To my knowledge it will not stop gulp from running.

所以,它并不影响项目的正常运行。