Vue cli is not installing
See original GitHub issueVersion
4.5.12
Reproduction link
https://stackoverflow.com/questions/66722303/vue-cli-is-not-installing/66722328#66722328
Environment info
I am using Bash on Ubuntu on Windows
node -v
v15.12.0
npm -v
7.6.3
Steps to reproduce
I did everything as root user:
First I tried
npm install -g @vue/cli
But this returned an error
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
Than I tried npm install -g --unsafe-perm @vue/cli but this also gave me the same error
After that I tried this but that didn’t worked also. npm config set user 0 npm config set unsafe-perm true
At least I tried npm install vue npm cache clean --force npm install -g @vue/cli
But this also returned the same error.
What is expected?
Install Vue CLI
What is actually happening?
Getting an error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Troubleshooting - Vue CLI
Running installation with sudo or as root #. If you install @vue/cli-service as root user or with sudo , there might be issues...
Read more >Can't install @vue/cli 3 on Windows 10 - Stack Overflow
On Windows 10: Open start (Win Key) -> Type: cmd -> Right-Click: Command Prompt -> Select: Run as Administer -> Type: npm install...
Read more >Installing @vue/cli globally using npm causes errors ... - GitHub
Running npm install -g @vue/cli displays multiple warnings. Then, running npm list -g --depth=0 lists the global packages fine but then shows ...
Read more >Vue CLI Service not installing - Build Environment
First, try installing the package globally. If this still does not resolve the issue, it may be that the node module is not...
Read more >Setting up Vue CLI 3 on our system - Packt Subscription
While it is not absolutely necessary to install NVM in order to run Vue CLI 3 on your system, installing NVM is desirable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, It looks like your NPM global bin directory is under some user permission privileges (root/sudo). NPM global dir path:
npm list -g | head -1
Try using sudo:
I used the following commands to firstly update the version of npm I was using, uninstalling older versions of vue cli and re-installing the latest vue cli.
npm install -g npm npm uninstall vue-cli -g npm i -g @vue/cli
These steps seemed to work for me. Hope its helpful to others with this issue 🤘