I cant run any command for vue.js

139 Views Asked by At

I am trying to create a new project in vue, but I always get this error. I have tried to uninstall node and install it again.. I have tried npm cache clean --force. I have tried to create it using "vue-ui". I have tried to change the directory but always get this error any one help please.

Error Log:

npm ERR! Unexpected end of JSON input while parsing near '...lize-package-data"],"'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2020-09-18T10_53_43_155Z-debug.log
1

There are 1 best solutions below

0
On

I resolved a similar issue regarding node and npm today.

What worked is as follows:

  1. npm cache clean --f did not work for me either. Hence, I deleted the "npm" and "npm-cache" folders from the location C:\Users\SearchYourUserName\AppData\Roaming

  2. Uninstalled the existing node.

  3. I needed node version v10.x.x. I downloaded the node-v10.22.1-x64.msi file from https://nodejs.org/dist/latest-v10.x/ and installed it.