创建 eggjs 项目错误 Install for [ 'create-egg@latest' ] failed with code 1
Windows 10 下使用 npm init egg --type=simple
创建项目时,出现如下错误
npm ERR! Unexpected end of JSON input while parsing near '...ilb2q5sK\ns140FnLS5+M'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2020-09-04T01_31_58_845Z-debug.log
Install for [ 'create-egg@latest' ] failed with code 1
解决方法:
npm install npm -g
npm install --registry=https://registry.npm.taobao.org --loglevel=silly
npm cache clean --force