[英]npm install - ERR! addLocal Could not install on Windows 10
I'm trying to install a new nodeJS project. 我正在尝试安装新的nodeJS项目。
I set node
and npm
as environment variable 我将
node
和npm
设置为环境变量
When I run command npm install
, I got errors as below: 当我运行命令
npm install
,出现以下错误:
What is my wrong? 我怎么了
Update details of
package.json
更新
package.json
详细信息
{
"name": "Project for myself",
"version": "2.0.0",
"private": true,
"scripts": {
"start": "node_modules/react-native/packager/packager.sh",
"test": "jest"
},
"dependencies": {
"firebase": "^3.6.4",
"lodash": "^4.17.2",
"moment": "^2.17.1",
"react": "15.4.2",
"react-addons-shallow-compare": "^15.3.2",
"react-immutable-component": "^0.0.1",
"react-native": "0.42.0-rc.3",
"react-native-admob": "git://github.com/minhcasi/react-native-admob.git",
"react-native-animatable": "0.*",
"react-native-drawer": "2.*",
"react-native-dropdownalert": "^2.3.0",
"react-native-fbsdk": "0.*",
"react-native-fence-html": "^1.0.6",
"react-native-global-props": "^1.1.1",
"react-native-invertible-scroll-view": "^1.0.0",
"react-native-linear-gradient": "2.*",
"react-native-localization": "0.*",
"react-native-modalbox": "1.*",
"react-native-onesignal": "^3.0.3",
"react-native-parallax-scroll-view": "0.*",
"react-native-router-flux": "3.*",
"react-native-scrollable-tab-view": "0.*",
"react-native-smart-splash-screen": "^2.2.1",
"react-native-snap-carousel": "^1.4.0",
"react-native-spinkit": "1.*",
"react-native-swiper": "1.*",
"react-native-timeago": "0.*",
"react-native-vector-icons": "4.*",
"react-timer-mixin": "^0.13.3",
"react-tween-state": "^0.1.5",
"readable-stream": "^2.2.2",
"safe-html": "^1.0.0",
"sanitize-html": "^1.13.0",
"urijs": "^1.18.4",
"url": "^0.11.0",
"util": "^0.10.3",
"wpapi": "^1.0.1"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"react-test-renderer": "15.4.2"
},
"jest": {
"preset": "react-native"
}
}
The installing worked with this package.json
content: 安装与此
package.json
内容一起使用:
{
"name": "Project for myself",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.4"
},
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"react-test-renderer": "16.0.0-alpha.6"
},
"jest": {
"preset": "react-native"
}
}
Issue is with the version of your application, to fix edit your package.json files version parameter to valid format 问题出在您的应用程序版本上,用于将您的package.json文件的版本参数修改为有效格式
"version": "2.0.0"
For more information on node.js versioning refer the following documentation. 有关node.js版本控制的更多信息,请参考以下文档。
UPDATE UPDATE
Try following and try again, 尝试关注并重试,
npm cache clear -f
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.