Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't be installed on latest windows 10 and can't initiale a new project #5840

Open
mrhili opened this issue Sep 1, 2020 · 14 comments
Open

Comments

@mrhili
Copy link

mrhili commented Sep 1, 2020

Version

4.5.4

Reproduction link

http://no-url.com/link-not/ok?

Environment info

windows 10 home
version : 1903
build :1832.1016

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/[email protected]: joi is leaving the @Hapi organization and moving back to 'joi' (hapijs/joi#2411)
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: 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

@haoqunjiang
Copy link
Member

Looks like a network issue related to the npm registry. Please check your network and try again.

@mrhili
Copy link
Author

mrhili commented Sep 1, 2020

Checked many times

24 houre of trying

@mrhili
Copy link
Author

mrhili commented Sep 1, 2020

maybe antivirus ?
i will see

@mrhili
Copy link
Author

mrhili commented Sep 1, 2020

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

@haoqunjiang
Copy link
Member

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

@mrhili
Copy link
Author

mrhili commented Sep 4, 2020

Not working even with this configuration

@haoqunjiang
Copy link
Member

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.

@geni94
Copy link

geni94 commented Sep 4, 2020

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?

@haoqunjiang
Copy link
Member

@geni94 Maybe npm install -g @vue/cli-init?

@geni94
Copy link

geni94 commented Sep 5, 2020

@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.

@mrhili
Copy link
Author

mrhili commented Sep 5, 2020

I will try and give you afeedback

@mrhili
Copy link
Author

mrhili commented Sep 5, 2020

PS C:\Users\HP> npm install -g vue

[email protected]
added 1 package from 1 contributor in 33.477s

@smilingkite
Copy link

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.

@felix-cao
Copy link

yarn cache clean
yarn global add @vue-cli

More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants