sudo npm install create-react-app -g 抛出错误(Ubuntu)
sudo npm install create-react-app -g throws error(Ubuntu)
sudo npm install create-react-app -g
抛出此错误:
npm ERR! Unexpected token < in JSON at position 0 while parsing near '<!DOCTYPE html>npm ERR! <ht...'
节点版本 10.8.0
npm 版本 6.2.0
Os Ubuntu 16.04
使用前sudo npm install create-react-app -g
使用npm cache clean --force
,应该可以,我之前试过。如需更多参考,您可以访问 here.
sudo npm install create-react-app -g
抛出此错误:
npm ERR! Unexpected token < in JSON at position 0 while parsing near '<!DOCTYPE html>npm ERR! <ht...'
节点版本 10.8.0
npm 版本 6.2.0
Os Ubuntu 16.04
使用前sudo npm install create-react-app -g
使用npm cache clean --force
,应该可以,我之前试过。如需更多参考,您可以访问 here.