Node.js 我不能安装盖茨比
列表项Node.js 我不能安装盖茨比,node.js,npm,gatsby,Node.js,Npm,Gatsby,列表项 C:\Users\admin>npm install -g gatsby-cli npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi' npm ERR! Unexpected end of JSON input while parsing near '...":{"name":"@babel/cod' npm ERR! A complete log of thi
C:\Users\admin>npm install -g gatsby-cli
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm ERR! Unexpected end of JSON input while parsing near '...":{"name":"@babel/cod'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2020-11-21T09_15_09_544Z-debug.log
C:\Users\admin>
尝试使用下面的命令
$ npm cache verify
$ npm cache clean --force
然后再试一次
如果仍然出现错误,请使用纱线包管理器。通过运行此程序安装纱线
$ npm install -g yarn
然后通过运行以下命令,将angular cli配置为使用纱线包管理器
$ ng config -g cli.packageManager yarn