-
Notifications
You must be signed in to change notification settings - Fork 348
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
Issue installing netlify-cli
with resulting EACCES permission denied error
#3870
Comments
@ehmicky any ideas why writing in the same directory as netlify config has issues? I have used the same method as the config to get the file and write it there on startup. |
Not that I can think of. However, I am wondering if this might be related to #3841? |
I tried to install it again into a local project and it did the same error. I tired to use a different version of node which did not work as well. |
Now sudo is not working either when trying to install it. |
@Fran-A-Dev hey can you provide more details on the npm install? which operating system and npm version is used? thx already in advance :) |
Hi Lukas! Thanks so much for looking into this. The npm version I am using is 8.3.0 The OS I am on is macOS Monterey version 12.1 Thank you! |
@lukasholzer I just tried again today after re-installing |
I've created a rc release with a fix. Can you verify if it worked for you?
|
@Fran-A-Dev thank you for verifying release is coming :) |
Super stoked! @lukasholzer I was missing the shared dev server over HTTPS tunnel and the lamba proxy on dev environment it does out of the box. |
@lukasholzer
Posted an image in github, it installed successfully, but had an error
output on terminal.
Cheers,
Fran
…On Tue, Jan 18, 2022 at 10:59 AM Lukas Holzer ***@***.***> wrote:
@Fran-A-Dev <https://github.com/Fran-A-Dev> thank you for verifying
release is coming :)
—
Reply to this email directly, view it on GitHub
<#3870 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARNEA7WROZBGHYMTSLB3NK3UWWMATANCNFSM5KN4DT3Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I Reopened the issue and added your comment here
|
Thank you @lukasholzer ! It was strange, when I installed it per your new release it successfully installed, then when trying to run a netlify utility command, it gave the error I sent you. Progress wise though, at least we got it installed. Thanks again for assisting on this! |
Sure thing @lukasholzer , can I just run that exact command in the screenshot on my terminal |
yep exact this command it will download a npm package that analyzes your system: should print something like that:
|
Awesome, just ran the command, here is the output @lukasholzer : |
So this looks all good, I see you invoke with I cannot reproduce it so please help my to troubleshoot this. Can you verify if this folder exists on your system? If yes can you print me the privileges of the folder?
and last but not least can you try writing to this folder with node?
after that run again:
this would verify if your node.js installation has issues with permissions. |
ahhh @lukasholzer ok let me try that now, One second here. |
@lukasholzer forgive me but what is the correct syntax in shell script to check if this |
@lukasholzer I ran this command, I think this is correct, it outputted that it does exists: |
@lukasholzer Did the commands and here is all the output it gave: |
yea thanks @Fran-A-Dev so we can track down it is not an issue of the CLI per se it seems you have installed node.js with a different user probably that is not allowed to write into your @ehmicky @erezrokah asking (as netlify is general relying on this folder if we should pick a different one?) 🤔 |
@lukasholzer Ok that is good to know. I will stand by and wait for your instructions on how to proceed to fix my permissions. |
We use https://github.com/sindresorhus/env-paths to get the recommended user specific directory: Line 26 in 5ba83d8
I was able to reproduce this issue by running:
This is basically this issue yeoman/configstore#34 (comment), where if you ran the CLI using You can find what Not sure if this was solved by the new version of the library here: @Fran-A-Dev a possible workaround is to delete the directory and let the CLI regenerate the files via:
Going forward I believe the fix is to ensure we don't generate @lukasholzer and @Fran-A-Dev please let me know what you think. |
@erezrokah I can try that workaround and see what happens. One second, I can try it momentarily. |
@lukasholzer @erezrokah Perfect! Success! It worked, it logged me into my Netlify dashboard. Thanks so much for the help! |
Hello! I just wanted to share a solution I came up with in the permission error as well. So what I did was headed to the ~/Library/Preferences/netlify folder and opened the "get info" option. Then I manually added my user in the "Sharing and Permission" section, together with read & write beside my user. After that, reload the terminal and all's good to go! |
I just stumbled upon this problem. The solution was simply to delete the prefs folder, and install again using Initially I installed the CLI using sudo |
Describe the bug
For some reason, when installing the
netlify-cli
we ran into an EACCES denied error to theautocompletion.json
file. It seems to pass through when we usesudo
in front of installing but this is even from a fresh install ofnvm
. And invoking the cli withsudo
seems to work fine, but any other way fails.To Reproduce
Steps to reproduce the behavior:
npm install netlify-cli -g
Configuration
This is at the global install level even outside of a given project.
Here is the output of
npx envinfo --system --binaries --npmPackages netlify-cli --npmGlobalPackages netlify-cli
:Expected behavior
It should properly install without any error output. The CLI should be usable without
sudo
in front.CLI Output
Here is the error output we're seeing:
EACCES error
Additional context
This was on a fresh M1 MacBook installation. This was on a fresh nvm installation as well. The correct path for
node
andnpm
seemed to be fine as well.The text was updated successfully, but these errors were encountered: