Skip to content

VueCLI wont install. #5922

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

Closed
Undecised opened this issue Oct 2, 2020 · 13 comments
Closed

VueCLI wont install. #5922

Undecised opened this issue Oct 2, 2020 · 13 comments
Labels

Comments

@Undecised
Copy link

Version

4.5.6

Environment info


Environment Info:

  System:
    OS: Windows 10 10.0.18362
    CPU: (4) x64 Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
  Binaries:
    Node: 14.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.18362.449.0)
  npmGlobalPackages:
    @vue/cli: Not Found


Steps to reproduce

yarn global add @vue/cli-init

vue init nuxt-community/express-template test

What is expected?

To make the template for nuxt vuejs

What is actually happening?

it says vuecli it's not installed even tough i had just installed it.

image

@gregg-cbs
Copy link

According to the docs its not cli-init, just cli
yarn global add @vue/cli

@fangbinwei
Copy link
Collaborator

fangbinwei commented Oct 25, 2020

Try to update @vue/cli to the latest version.
Or
Check If there is node_modules/@vue/cli-init in yarn global dir.
It may be the environment problem, need more info

@fangbinwei
Copy link
Collaborator

fangbinwei commented Oct 26, 2020

I guess you install @vue/cli by npm, but the warning message reminds you to install @vue/cli-init by yarn global add. It has been fixed in 4.5.7, #5871. After upgrade @vue/cli, the warning message will remind you to use npm install -g

Although Vue CLI will try to require module from both yarn global path and npm global path by dependencies import-global, [email protected]. It seems the [email protected] give the wrong yarn global path(fixed in 1.0.0 sindresorhus/global-directory#3 )

Test in my windows,
my yarn global path is %LOCALAPPDATA%\Yarn\Data\global, but the value return by [email protected] is %LOCALAPPDATA%\Yarn\config\global.

@Undecised
Copy link
Author

Thanks its running now.

@fangbinwei
Copy link
Collaborator

I guess you install @vue/cli by npm

That's true ?
@Wishingirl

@Undecised Undecised reopened this Oct 26, 2020
@Undecised
Copy link
Author

I just checked seems i still have trouble..
image

@Undecised
Copy link
Author

Undecised commented Oct 26, 2020

Env info:

04:35:53 user@WINDOWS-PC ExpressVue →yarn global dir
C:\Users\user\AppData\Local\Yarn\Data\global

(Currently running on an empty folder)

@fangbinwei
Copy link
Collaborator

What the output information of yarn global list and npm list -g --depth=0 @Wishingirl

@Undecised
Copy link
Author

image

@fangbinwei
Copy link
Collaborator

You install @vue/cli by both yarn and npm. If the output of vue --version is 4.5.6, It means you executed vue from npm global bin path.

So, try to run npm uninstall @vue/cli -g and use the version installed by yarn. @Wishingirl

@Undecised
Copy link
Author

Alright. On it.

@Undecised
Copy link
Author

It works now! Generating templates and working as intended. Thanks.

@fangbinwei
Copy link
Collaborator

I guess you install @vue/cli by npm, but the warning message reminds you to install @vue/cli-init by yarn global add. It has been fixed in 4.5.7, #5871. After upgrade @vue/cli, the warning message will remind you to use npm install -g

Although Vue CLI will try to require module from both yarn global path and npm global path by dependencies import-global, [email protected]. It seems the [email protected] give the wrong yarn global path(fixed in 1.0.0 sindresorhus/global-dirs#3 )

Test in my windows,
my yarn global path is %LOCALAPPDATA%\Yarn\Data\global, but the value return by [email protected] is %LOCALAPPDATA%\Yarn\config\global.

Since @vue/cli@^4.5.7 can output more accurate warnings message, import-global should be removed or try to upgrade global-dirs. Still need to be considered.

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

No branches or pull requests

3 participants