Truffle npm module 4.1.x versions does not install properly on a Mac OS.
npm install truffle -g It should install without error.
➜ ~ 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
truffle version): 4.1.xnode --version): 8.11.1 (also tried using 10.x and 7.x) with no lucknpm --version): 5.6.0sudo does not worknode_modules folder does not work (already has proper permissionsnpm install [email protected] works and is the last version that does not throw the error.@Superjisan. I'm also on OSX. Below is my output for installing. Can you find a difference we can test against?
> system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.13.1 (17B1003)
Kernel Version: Darwin 17.2.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: User’s MacBook Air
User Name: User (cgewecke)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 2:04
> npm --version
5.6.0
> node --version
v9.5.0
> npm uninstall -g truffle
removed 1 package in 4.561s
> npm install -g truffle
/Users/cgewecke/.nvm/versions/node/v9.5.0/bin/truffle -> /Users/cgewecke/.nvm/versions/node/v9.5.0/lib/node_modules/truffle/build/cli.bundled.js
+ [email protected]
added 92 packages in 8.162s
@cgewecke that is strange. here's my system info
system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.13.4 (17E199)
Kernel Version: Darwin 17.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: test’s MacBook Pro
User Name: Admin (admin)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 23:26
Also just tried with v.9.5.0 and same issue. How do you have your node versions install @cgewecke ?
Kernel and System Versions are different. But I wonder why that would cause the issue
I also have this issue and this is what my system_profiler outputs:
System Software Overview:
System Version: macOS 10.12.3 (16D32)
Kernel Version: Darwin 16.4.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Joe’s MacBook Pro
User Name: Joe N (joen)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 35 days 1:06
@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!
@cgewecke I've actually tried installing using brew, nvm, and just standalone from the website and so far no luck.
I'll dig around more...
@cgewecke it worked using 6.9.0 just now.
@Superjisan Oh, that's strange. Node should be backward compatible to any version . . .
@collincusce Are you also seeing this installation problem? Trying to figure out how widespread this is.
Nah, @superjisan is on my team so I'm monitoring the progress on this.
@Superjisan Did this ever work itself out?
@cgewecke I guess I have figured out a workaround with using a 6.9.0 version of node but it doesn't work on my computers with versions above that with the latest truffle versions.
@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.
Ah awesome!! Thanks @Superjisan.
@Superjisan I have the same issue! May I ask how you managed to close the antivirus software?
@mhlljm I had to disable the antivirus software from my computer to get it to work. You might need to talk to your IT department if you require a password or something
Most helpful comment
@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.