NPM installation Vue scaffold error report
error reporting details
npm ERR! Unexpected end of JSON input while parsing near '...TuHxXJaknDulF3AdSBoul'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\xxx\AppData\Roaming\npm-cache\_logs\2019-12-22T03_12_06_342Z-debug.log
final solution
npm cache clean --force
npm i -g npm
No, try these again
npm ls --depth 0 -g // See what's not working
npm prune -g // prune the global package
npm rebuild -g // rebuild the global package
npm update -g // update the version of the global package
npm cache clear --force -g // remove the cache of the global package (be careful)
by the way, it’s no use reloading (I tried)
Install again
C:\Users\xxx>npm install vue-cli -g
npm WARN deprecated [email protected]: This package has been deprecated in favour of @vue/cli
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
C:\Users\xxx\AppData\Roaming\npm\vue -> C:\Users\xxx\AppData\Roaming\npm\node_modules\vue-cli\bin\vue
C:\Users\xxx\AppData\Roaming\npm\vue-init -> C:\Users\xxx\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-init
C:\Users\xxx\AppData\Roaming\npm\vue-list -> C:\Users\xxx\AppData\Roaming\npm\node_modules\vue-cli\bin\vue-list
+ [email protected]
added 241 packages from 206 contributors in 170.007s
C:\Users\xxx>vue -V
2.9.6
C:\Users\xxx>
Similar Posts: