微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我同时使用了 yarn 和 npm,现在我无法运行 npm/yarn start

如何解决我同时使用了 yarn 和 npm,现在我无法运行 npm/yarn start

我创建了一个 React 项目并同时使用了 npm 和 yarn,它运行良好,直到我关闭该项目,我今天重新打开,现在当我运行 npm start 时,它说:

npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/chiara/.npm/_logs/2021-07-15T13_52_07_909Z-debug.log

当我尝试使用 yarn start 时:

yarn run v1.22.10
warning package.json: "dependencies" has dependency "jquery" with range "^3.4.1" 
that collides with a dependency in "devDependencies" of the same name with version "^3.1.1"
error Command "start" not found.

package.json 我有

  "scripts": {
"start": "react-scripts start","build": "react-scripts build","test": "react-scripts test","eject": "react-scripts eject"

},

$ npm --version
6.14.10
$ yarn --version
1.22.10

我该怎么办?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。