erreur d'installation npm, bloqué et solution (mac)

1. Invite lors de l'installation de npm : npm ERR! Unexpected end of JSON input while parsing near '... PGP SIGNATURE-----\r'
Solution :

npm cache clean --force // 如果出现提示npm WARN using --force I sure hope you know what you are doing 则表示清除成功

npm install // 再次执行npn install即可

2. Lors de l'installation de npm, j'ai constaté qu'il était bloqué. fetchMetadata: sill install loadAllDepsIntoIdealTree
Raison : l'installation est trop lente. Vous pouvez attendre patiemment ou installer le miroir Taobao.

solution:

npm  install node-sass \--registry=http://registry.npm.taobao.org // 从淘宝镜像安装

3. npm run dev prompt : sh: vue-cli-service: command not found
insérez la description de l'image ici
solution : erreur mac : sh : vue-cli-service : commande introuvable
commande d'exécution du terminal

#清除缓冲
npm cache clean --force   
#重新安装
npm/cnpm  install

Lorsque npm install signale une erreur, utilisez la commande cnpm install
et exécutez-la enfin : npm run dev
insérez la description de l'image ici
finalement réussi ! ! !

Je suppose que tu aimes

Origine blog.csdn.net/qq_34663267/article/details/117992377
conseillé
Classement