运行后在reactJs中
npm开始
给出
./ src / index.js找不到模块:无法解析“ react” 'C:\ Users ... \ src'
错误 这是我的package.js
{
"name": "client-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@aspnet/signalr": "^1.0.4",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-scripts": "^1.1.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
答案 0 :(得分:2)
尝试删除package-lock.json
,运行npm install
,然后再次运行npm start
。