0

I already have nodejs v10.19.0 globally installed.

I have npm first (both on my branch with the project and on root):

valentin@valentin:~$ npm i -g @vue/cli
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN rm not removing /home/valentin/.npm-global/bin/vue as it wasn't installed by /home/valentin/.npm-global/lib/node_modules/@vue/cli
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/@vue/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/@vue/cli/bin/vue.js
npm ERR! dest /home/valentin/.npm-global/bin/vue
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/@vue/cli/bin/vue.js' -> '/home/valentin/.npm-global/bin/vue'
npm ERR! File exists: /home/valentin/.npm-global/bin/vue
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/valentin/.npm/_logs/2020-02-08T10_36_35_054Z-debug.log
valentin@valentin:~$ npm i -g @vue/cli --force
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
/home/valentin/.npm-global/bin/vue -> /home/valentin/.npm-global/lib/node_modules/@vue/cli/bin/vue.js

> fsevents@1.2.11 install /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/fsevents
> node-gyp rebuild

make: Entering directory '/home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/fsevents/build'
  SOLINK_MODULE(target) Release/obj.target/.node
  COPY Release/.node
make: Leaving directory '/home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/fsevents/build'

> core-js@2.6.11 postinstall /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/babel-polyfill/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@2.6.11 postinstall /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.4 postinstall /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> @apollo/protobufjs@1.0.3 postinstall /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/@apollo/protobufjs
> node scripts/postinstall


> nodemon@1.19.4 postinstall /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/nodemon
> node bin/postinstall || exit 0


> ejs@2.7.4 postinstall /home/valentin/.npm-global/lib/node_modules/@vue/cli/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

+ @vue/cli@4.2.2
added 1178 packages from 661 contributors in 40.25s
valentin@valentin:~$ vue --version

Command 'vue' not found, did you mean:

  command 'vpe' from deb texlive-latex-extra

Try: sudo apt install <deb name>



valentin@valentin:~/code/Vue.js/Vue Mastery/Real World Vue.js$ npm i core-js

> core-js@3.6.4 postinstall /home/valentin/code/Vue.js/Vue Mastery/Real World Vue.js/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN saveError ENOENT: no such file or directory, open '/home/valentin/code/Vue.js/Vue Mastery/Real World Vue.js/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/valentin/code/Vue.js/Vue Mastery/Real World Vue.js/package.json'
npm WARN Real World Vue.js No description
npm WARN Real World Vue.js No repository field.
npm WARN Real World Vue.js No README data
npm WARN Real World Vue.js No license field.

+ core-js@3.6.4
updated 1 package and audited 469 packages in 1.471s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
valentin@valentin:~$ npm outdated
Package                Current  Wanted  Latest  Location
@vue/babel-preset-app    4.1.0   4.2.2   4.2.2  global

I used yarn and the output was:

valentin@valentin:~$ yarn global add @vue/cli
yarn global v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.11: The platform "linux" is incompatible with this module.
info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "@vue/cli@4.2.2" with binaries:
      - vue
Done in 2.65s.
valentin@valentin:~$ vue --version

Command 'vue' not found, did you mean:

  command 'vpe' from deb texlive-latex-extra

Try: sudo apt install <deb name>

As you can see this is a never-ending process. I read many threads on stack, git, etc. but they didn't help. Maybe it is because i didn't install nodejs before installing vue/cli but then i purged nodejs and installed, tried install vue/cli again but no success.

Does it make any difference if I install these 2 on the branch of my project or on root if do that globally. I think it's not the issue either.

CoryCoolguy
  • 1,065
  • 8
  • 18
chullspen
  • 55
  • 8
  • I hope you have checked these threads- https://stackoverflow.com/questions/51957631/vue-command-not-found and https://stackoverflow.com/questions/14803978/npm-global-path-prefix – AmitP Feb 08 '20 at 15:57
  • @AmitP I have checked the first one but I haven't seen the second thread. Hope this will point me to the right direction. I will let you know later. Thanks! – chullspen Feb 08 '20 at 16:38
  • @AmitP updating my PATH command really did help. Though I have seen the thread before this time I paid more attention to it (there are just too much proposed solutions on this issue so I got distracted by many others going back and forth). Thank you!! – chullspen Feb 10 '20 at 18:21
  • Updating my PATH variable helped [here's a related topic but for MacOC](https://stackoverflow.com/questions/51957631/vue-command-not-found?noredirect=1&lq=1) – chullspen Feb 10 '20 at 18:23

0 Answers0