EACCES: permission denied, open '/Users/stefma/.config/truffle/config.json' after installing Truffle

Viewed 365

I tried literally all there is so far and I still can't run truffle macOS 11.6. that's what I tried after of course first installing it with the command npm install -g truffle:

  1. Downloading command line tools for Xcode and then installing with sudo npm install -g truffle

  2. sudo npm install --unsafe-perm=true --allow-root truffle

  3. sudo chown myUsername:myUsername -R ~/.config

  4. installing npm and node with nvm all over.

I'd be really grateful for any help

1 Answers

This should work kindly check [YourMacOSUserName] in fir place you MacOSUserName in it and please must rate my effort will be here for any further query.

sudo rm -rf /Users/[YourMacOSUserName]/Library/Preferences/netlify/

npm install -g netlify-cli

sudo ntl login

Related