安装React-Native时npm错误“标题内容包含无效字符”?

时间:2016-06-28 00:42:42

标签: node.js facebook reactjs react-native

$ sudo npm install –g react-native-cli
npm ERR! addLocal Could not install /usr/local/bin/–g
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "–g"       "react-native-cli"
npm ERR! node v6.2.2
npm ERR! npm  v2.14.7

npm ERR! The header content contains invalid characters
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/bin/npm-debug.log

我正在关注https://facebook.github.io/react-native/docs/getting-started.html

的指南

遇到那个错误的墙。我安装了XCode,无法找到下一步的解决方案。

1 个答案:

答案 0 :(得分:0)

使用Homebrew结束卸载节点并重新安装最新版本。我确保安装了最新版本的npm。