【问题标题】:npm error " The header content contains invalid characters" when installing React-Native?安装 React-Native 时出现 npm 错误“标头内容包含无效字符”?
【发布时间】:2016-10-30 03:20:47
【问题描述】:
$ 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,但找不到下一步的解决方案。

【问题讨论】:

  • 你安装了哪个版本的XCode?​​span>
  • 7.1 - XCode 只是开始使用 React Native 的一个步骤。
  • 好吧,因为教程说你需要 7.0+,但你确实需要

标签: node.js facebook reactjs react-native


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2020-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-24
    • 1970-01-01
    • 2019-05-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多