大佬教程收集整理的这篇文章主要介绍了node.js – React-native:看起来你全局安装了react-native,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
$react-native run-ios Looks like you installed react-native globally,maybe you meant react-native-cli? To fix the issue,run: npm uninstall -g react-native npm install -g react-native-cli
在其他论坛上发布的解决方案对我不起作用,我不明白为什么这不起作用的原因.
的package.json:
{ "name": "react-native-svgkit","version": "0.2.2","main": "Svg.js","description": "A <Svg /> element for react-native that renders Svg images using SVGKit","author": "Brent Vatne <brentvatne@gmail.com> (https://github.com/brentvatnE)","peerDependencies": { "react": "15.1.0","react-native": ">=0.4.4" },"devDependencies": { "react-native": ">=0.4.4","react-native-cli": "^0.1.10" },"dependencies": { "d3": "^3.5.5","jsdom-jscore": "^0.1.0","react-native-svg": "^2.2.0" },"repository": { "type": "git","url": "git@github.com:brentvatne/react-native-svgkit.git" },"scripts": { "start": "node /usr/local/lib/node_modules/react-native/local-cli/cli.js start" } }
npm list -g --depth=0 # to list all your globally installed packages rm -rf /usr/local/lib/node_modules brew uninstall node brew install node --without-npm echo prefix=~/.npm-packages >> ~/.npmrc curl -L https://www.npmjs.com/install.sh | sh
然后,您必须使用npm install -g< package_name>重新安装全局安装的所有npm软件包.
不幸的是,当我重新启动机器时,同样的问题又重新出现了.我目前的工作是遵循建议here,即
npm install --save-dev react-native-cli
有关正在发生的事情的任何解释都是受欢迎的.
以上是大佬教程为你收集整理的node.js – React-native:看起来你全局安装了react-native全部内容,希望文章能够帮你解决node.js – React-native:看起来你全局安装了react-native所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。