mstdmstd
mstdmstd

Reputation: 3083

After command yarn global add @vue/cli vue is not found in my OS

I want to move to vuejs 3 and tried to create new vuejs 3 app and got error that vue is not found. I do :

$ npm -version
6.14.8
$ nodejs --version
v14.12.0
$ cd ../
$ yarn global add @vue/cli
yarn global v1.22.5
[1/4] Resolving packages...
warning @vue/cli > @vue/cli-shared-utils > @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @vue/cli > @vue/cli-shared-utils > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @vue/cli > @vue/cli-shared-utils > request > [email protected]: this library is no longer supported
warning @vue/cli > @vue/cli-shared-utils > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @vue/cli > @vue/cli-ui > vue-cli-plugin-apollo > nodemon > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @vue/cli > @vue/cli-ui > vue-cli-plugin-apollo > nodemon > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning @vue/cli > globby > fast-glob > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning @vue/cli > globby > fast-glob > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@vue/[email protected]" with binaries:
- vue
Done in 26.33s.
$ vue --version

Command 'vue' not found, but can be installed with:

sudo snap install vue

$ vue create V3Y

Command 'vue' not found, but can be installed with:

sudo snap install vue

I reinstalled my kubuntu 18 about a month ago and have been working with vuejs2 app created before. But I did not create any new vuejs app and wonder iif mentioned

I suppose that the command to install vue above is a wrong command.

Is something misconfigured in my OS?

EDITED: I found usefull command : $ export PATH="$(yarn global bin):$PATH" but creating new app with options selected : ❯ Default (Vue 3 Preview) ([Vue 3] babel, eslint) ❯ Yarn :

I got error in the console :

Vue CLI v4.5.8
Failed to check for updates
✨  Creating project in /mnt/_work_sdb8/wwwroot/lar/VApps/v3y.
🗃  Initializing git repository...
⚙️  Installing CLI plugins. This might take a while...

00h00m00s 0/0: :  ERROR  Error: Command failed: yarn config get npmRegistryServer
ERROR: [Errno 2] No such file or directory: 'config'


Error: Command failed: yarn config get npmRegistryServer
ERROR: [Errno 2] No such file or directory: 'config'


    at makeError (/home/serge/.config/yarn/global/node_modules/execa/index.js:174:9)
    at /home/serge/.config/yarn/global/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async PackageManager.getRegistry (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:194:21)
    at async PackageManager.setRegistryEnvs (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:235:22)
    at async PackageManager.runCommand (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:336:5)
    at async PackageManager.install (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/util/ProjectPackageManager.js:381:12)
    at async Creator.create (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/Creator.js:216:7)
    at async create (/home/serge/.config/yarn/global/node_modules/@vue/cli/lib/create.js:72:3)

Some wrong config in my OS?

Thanks!

Upvotes: 5

Views: 2474

Answers (1)

Set this path:

export PATH="$HOME/.yarn/bin:$PATH"

Then, you can use vue:

enter image description here

Upvotes: 4

Related Questions