Open mrhili opened 4 years ago
Looks like a network issue related to the npm registry. Please check your network and try again.
Checked many times
24 houre of trying
maybe antivirus ? i will see
Vue CLI v3.8.4 ✨ Creating project in C:\laragon\www\learning-projects\crashcourse. � Initializing git repository... ⚙ Installing CLI plugins. This might take a while...
npm ERR! Unexpected end of JSON input while parsing near '...ed-require":"0.2.x","'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Roaming\npm-cache_logs\2020-09-01T19_50_58_244Z-debug.log ERROR command failed: npm install --loglevel error --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist
For the second error, run
vue config --set useTaobaoRegistry false
and try again.
BTW you are using a very old version of @vue/cli
, it's recommended to upgrade to the latest v4.5
Not working even with this configuration
If the error message still says "npm ERR! Unexpected end of JSON input while parsing near" then it's clearly a network/npm issue. In that case, there's nothing more I can help you with.
I'm having this issue as well.
Specs: Windows 10 Node 14.8.0 Yarn 1.22.5
Running vue init [params]
throws the following error:
Command vue init requires a global addon to be installed.
Please run yarn global add @vue/cli-init and try again.
Installing @vue/cli-init separately didn't solve the issue. Any clue?
@geni94 Maybe npm install -g @vue/cli-init
?
@geni94 Maybe
npm install -g @vue/cli-init
?
That didn't help either: it kept throwing the error.
Apparently using yarn
was causing the issue, although I'm still not sure why. Uninstalling everything and then installing again with npm
fixed the issue for me, although I wanted to use yarn and not npm.
I will try and give you afeedback
PS C:\Users\HP> npm install -g vue
vue@2.6.12 added 1 package from 1 contributor in 33.477s
For what it's worth: I was unable to use gitBash (even with administrator-rights) to start a vue-cli project, but the command prompt worked like a charm.
Version
4.5.4
Reproduction link
http://no-url.com/link-not/ok?
Environment info
Steps to reproduce
http://no-url.com/link-not/ok?
What is expected?
http://no-url.com/link-not/ok?
What is actually happening?
i cannot install vue cli in windows 10
npm i -g @vue/cli @vue/cli-service-global npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411) npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm ERR! Unexpected end of JSON input while parsing near '...^1.16.31","@types/web'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\HP\AppData\Roaming\npm-cache_logs\2020-09-01T15_33_15_167Z-debug.log
if i install vue like : npm i -g vue installed succefully but cant initiat a new a project