`npm install truffle -g` doesn't work on Mac for 4.1.x versions
See original GitHub issue- [ x] I’ve asked for help in the Truffle Gitter before filing this issue.
Truffle NPM Module doesn’t install properly on a Mac OS
Truffle npm module 4.1.x versions does not install properly on a Mac OS.
Steps to Reproduce
- Be on a Mac OS. My particular machine is Mac OS High Sierra 10.13.4, but I was experiencing this issue before I upgraded to High Sierra.
- Open up terminal and execute
npm install truffle -g
Expected Behavior
It should install without error.
Actual Results
➜ ~ npm i truffle -g
npm ERR! path /usr/local/lib/node_modules/truffle/build/cli.bundled.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall open
npm ERR! Error: EACCES: permission denied, open '/usr/local/lib/node_modules/truffle/build/cli.bundled.js'
npm ERR! { Error: EACCES: permission denied, open '/usr/local/lib/node_modules/truffle/build/cli.bundled.js'
npm ERR! cause:
npm ERR! { Error: EACCES: permission denied, open '/usr/local/lib/node_modules/truffle/build/cli.bundled.js'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/usr/local/lib/node_modules/truffle/build/cli.bundled.js' },
npm ERR! stack: 'Error: EACCES: permission denied, open \'/usr/local/lib/node_modules/truffle/build/cli.bundled.js\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'open',
npm ERR! path: '/usr/local/lib/node_modules/truffle/build/cli.bundled.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/admin/.npm/_logs/2018-04-25T18_53_07_022Z-debug.log
Environment
- Operating System: Mac OS
- Ethereum client:
- Truffle version (
truffle version
): 4.1.x - node version (
node --version
): 8.11.1 (also tried using 10.x and 7.x) with no luck - npm version (
npm --version
): 5.6.0
Further Steps Taken to Resolve this issue
- Installing with
sudo
does not work - Changing permission on global
node_modules
folder does not work (already has proper permissions npm install truffle@4.0.7
works and is the last version that does not throw the error.
Possible Causes
- Some change in the package.json or installation process that occurred from the tag 4.0.7 to 4.1.x
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Installation - Truffle Suite
Note: to install the latest version of npm , run npm i -g npm. Node Package Manager (NPM) recommends installing Node.js and npm...
Read more >Can't install Truffle Framework to Mac OS Big Sur
But I am still having a problem using the truffle command in my macOS Big Sur version 11.5.1. Hope this will help you...
Read more >Truffle command not found after installation - Stack Overflow
I had a similar problem. I ran npm i -g truffle and then when I tried to run truffle init I got an...
Read more >How to solve npm truffle access error in Mac - Quora
Truffle npm module 4.1.x versions does not install properly on a Mac OS. Steps to Reproduce ... Open up terminal and execute npm...
Read more >tronbox - npm
TronBox v3.0.0. Simple development framework for tronweb TronBox is a fork of Truffle code. Installation. npm install -g tronbox ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top 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
@cgewecke I figured out the issue. There was some antivirus software that was blocking access to some directories in our local. You can close this issue.
@Superjisan I’m using a node version manager called nvm because Truffle is built for 6.9.1 and sometimes it’s helpful to toggle down and make sure everything works.
One thing that occurs to me is that if this problem had begun with 4.0.7 we would have had dozens of reports since then, but yours is the first. Perhaps something has changed outside truffle more recently that’s causing it. Based on the sample of OS data above doesn’t seem like there’s much of pattern there. . .
@Joebob12 Anything else you can add might help isolate the cause of this, thanks!