简体   繁体   English

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

throws this error: 抛出此错误:

npm ERR! Unexpected token < in JSON at position 0 while parsing near '<!DOCTYPE html>npm ERR! <ht...'

node version 10.8.0 节点版本10.8.0

npm version 6.2.0 npm版本6.2.0

Os Ubuntu 16.04 操作系统Ubuntu 16.04

Before using sudo npm install create-react-app -g use npm cache clean --force , It should work, i tried it before. 在使用sudo npm install create-react-app -g使用npm cache clean --force ,它应该可以工作,我之前尝试过。 For more reference you can visit here . 有关更多参考,请访问此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM