sudo npm install create-react-app -g引发错误(Ubuntu)

时间:2018-10-13 17:18:13

标签: javascript reactjs ubuntu-16.04

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

1 个答案:

答案 0 :(得分:0)

使用sudo npm install create-react-app -g 之前 使用npm cache clean --force,它应该可以工作,我之前曾尝试过。有关更多参考,请访问here

相关问题