尝试在此项目上npm install
时出现以下错误:https://github.com/datso/react-native-pjsip-app
tar: .libs.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
npm WARN react-native@0.41.2 requires a peer of react@~15.4.0 but none is installed. You must install peer dependencies yourself.
我不知道如何安装React Native,该项目已有1年的历史,我想我必须以某种方式更新到最新版本?
遵循http://www.cnblogs.com/mmx8861/p/9150009.html的指南,我做到了: n
pm cache clean
Modified package.json with: "react":"~15.4.1"; "react-native":"0.42.3"; "react-test-renderer":"15.4.1"
npm install all module
npm install
npm i react-native-maps@0.12.5 --S
react-native link react-native-maps
手动更改为React16会导致:
npm WARN enzyme@2.9.1 requires a peer of react@0.13.x || 0.14.x || ^15.0.0-0 || 15.x but none is installed. You must install peer dependencies yourself.
npm WARN react-dom@15.6.2 requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
然后我将"enzyme": "^2.9.1"
更改为"enzyme": "^3.0.0"
,将"react-dom": "^15.6.0"
更改为"react-dom": "^15.6.0"
,现在我陷入了困境:
npm WARN react-addons-perf@15.4.2 requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-addons-test-utils@15.6.2 requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-dom@15.6.2 requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
根据React,似乎从React 16起就不再支持对react-addons-perf的支持!
如何解决npm安装错误?
欢呼