【发布时间】:2017-12-17 09:16:26
【问题描述】:
我不小心删除了我的node_modules 文件夹。我知道找回它的方法就是运行npm install,但这在我的情况下不起作用。这说明我的JSON 文件有问题。我在Terminal 中收到此错误。
这是我的Package.js 文件:
{
"name": "App",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"aws-sdk": "git://github.com/aws/aws-sdk-js.git#react-native",
"react": "^16.0.0-alpha.12",
"react-native": "^0.45.1",
"react-native-aws-signature": "0.0.9",
"react-native-dropdown-menu": "^1.1.0",
"react-native-dynamodb": "0.0.5",
"react-redux": "^5.0.5",
"redux": "^3.7.1"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "2.0.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
},
}
错误:
Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
【问题讨论】:
标签: javascript reactjs react-native terminal