node.js - yarn run start 有效, npm run start 什么也不返回
问题描述
为什么$yarn run start
有效$npm run start
却什么也不做?$ npm -v 6.13。
这是我的 package.json
{
"name": "my project",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-redux": "^7.1.3",
"react-scripts": "^3.3.0",
"redux": "^4.0.4",
"typescript": "^3.7.3"
},
"scripts": {
"start": "./node_modules/react-scripts/bin/react-scripts.js start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"proxy": "http://localhost:3001/",
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
我需要$npm run start
执行。它绝对没有返回任何内容,甚至没有警告,好像它无法解析 package.json 文件一样。