-
Notifications
You must be signed in to change notification settings - Fork 823
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
npm package fails to install "npm ERR! Error: EACCES: permission denied" #14
Comments
There is another wired thing about npm. When I try to install gulp globally I get:
|
Same here. In fact if I try to update npm update -g npm@latest it attempts to copy lodash to the staging directory then throws the errror. Following this subsequent attempts to use npm are broken because it can no longer find lodash. IMPORTANT This really should be of utmost importance to the team. I for one was very excited and love how everything else works, but as you are adding this feature to windows with the intention of bringing web developers back to windows this needs fixing ASAP. This alone will stop me switching back to windows for web development and I'm sure it will be the same for many. It defeats the purpose of switching for me. Please please please fix. |
@borovaka you can fix that error by allowing unsafe perms
|
Already tried. It bypasses the error but it still doesn't work. You will On Friday, April 8, 2016, John Christopher notifications@github.com wrote:
|
@jamesscholeyweb right, I was able to get to your error after setting those perms. Otherwise I wasn't able to do anything. |
This seems to be the underlying issue.
|
Related: MicrosoftDocs/WSL#26 It seems to be an issue with symlinks |
Confirmed - this is totally related to the symlink issue. |
Same here with
Here's the output
|
This looks a lot like #3. We can keep the conversation going on there. What I can say right now is that things are getting better (at least in non-mnt directories.). On my dev box I see:
It goes on from there. I should point out that I have not tried to actually use any of these, I have only installed them. The team is hard at work getting stuff up and running. Npm is one of those things we're looking at now. |
Full disclosure here. Doing a little more testing on our internal build and finding that doing an "npm -g install " still throws the uv_pipe_open error, even when in ~/tmp. We have someone looking into it. |
This seems also to be a valid issue when running npm in the new Windows 10 Bash This solved it for me: https://gist.github.com/mattpodwysocki/4e6951fc93adae064a73ed0b2251d180
I have no idea what it does however. |
If you are using with -g option, try to remove it. |
I just ran into this trying to do
|
You can bypass all permission problems by changing the prefix for npm. |
Actually I had already set the To fully repro:
|
Hey, I just managed to fix an issue with my setup by taking ownership of the folder that Node was installed to. I use NVM to manage node versions, so in my case Node was installed in So, to fix it, I used |
The error still happens in
|
Does this happen if you don't use |
@aseering no, it didn't work unfortunately, same rename error on node |
你用的nvm安装对吧,我试过,我在root下也会报错 |
still getting this issue now, i agree that running it with sudo and changing ownership/file permissions is not a fix |
I faced the same issue as @jamespacileo in Windows 10 WSL 2 while trying to install a Svelte template on the Ubuntu side of the terminal. This command "npx degit sveltejs/template myproj/" was failing. I switched from Ubuntu to PowerShell on Terminal and ran the operation there successfully. Once "myproj" was setup, I switched back to my Ubuntu terminal. |
If you still want to use the Ubuntu terminal make sure you have It also helps resolve this issue : #2097 |
How is this still an issue five years later? Microsoft, explain. |
this works for me, thanks! Use nvm to install node and npm, do not install them independently |
I removed nodejs curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs it worked for me. |
I needed nodejs@14 but npm@latest and using n to switch to node 14 and then npm i -g npm@latest always resulted in the error To solve the issue I installed the latest node using n |
try set prefix out of c disk, such as |
C:\Users\Dell>npm audit npm audit reportansi-regex >2.1.1 <5.0.1 3 moderate severity vulnerabilities To address all issues, run: please any one can help to remove this error |
I got error with 64 bit node 14,16,17v so i just uninstall this i am not able to create npx create-react-app, so i install 34 bit node latest version now i am able to create react-app my os is 64-bit. |
Easiest solution here I found was to just use a node package manager (e.g. NVM), then global installs work fine at least |
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
If you're using VS Code and find yourself getting this error message, close VS Code, run the desired command, and restart VS Code, as indicated in https://stackoverflow.com/questions/60853873/eaccess-error-when-installing-packages-on-wsl |
If you installed node from apt-get, uninstall it completely and install it from NVM (Node Version Manager) Uninstalling node (Ubuntu)sudo apt-get purge --auto-remove nodejs Update apt indexessudo apt update && sudo apt upgrade Install NVMsudo apt-get install -y curl \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \
&& source ~/.bashrc Finally, install node and npmnvm install --lts |
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
it says:
|
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
Thanks it worked |
I have fixed my problem on mac by |
While trying to install a packge with npm (for example lodash) it fails with error message:
I have tried to install it both with and without starting bash in administrator mode.
The text was updated successfully, but these errors were encountered: