gpt4 book ai didi

node.js - 安装 React-Native 时出现 npm 错误 "The header content contains invalid characters"?

转载 作者:搜寻专家 更新时间:2023-10-31 22:54:22 24 4
gpt4 key购买 nike

$ 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,但找不到下一步的解决方案。

最佳答案

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

关于node.js - 安装 React-Native 时出现 npm 错误 "The header content contains invalid characters"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38065341/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com