I am trying to install VueJS but I am getting errors.
I am using Bash on Ubuntu on Windows
node -v
v15.12.0
npm -v
7.6.3
Firt I tried this
npm install -g @vue/cli
But this returns me some warnings and errors
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
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 @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm ERR! code 127
npm ERR! path /root/.nvm/versions/node/v15.12.0/lib/node_modules/@vue/cli/node_modules/core-js
npm ERR! command failed
npm ERR! command sh -c node -e "try{require('./postinstall')}catch(e){}"
npm ERR! sh: 1: node: Permission denied
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-03-20T13_34_56_981Z-debug.log
I tried it with sudo but I am running it already as administrator.
sudo: npm: command not found
After that I tried npm install -g --unsafe-perm @vue/cli but I got the same error message as before.
After that I tried
npm config set user 0
npm config set unsafe-perm true
and after I tried that I did againnpm install -g @vue/cli but this also returned the same error.
Then I tried this
npm install vue
npm cache clean --force
npm install -g @vue/cli
But this also didn't worked for me it returned the same error....
So can someone help to fix this error?