Prerequisites Discussion

Welcome to the discussion about this section. Here you can ask questions or post feedback about this specific section.

I have this issue in the terminal of my new Mac Air when I’m trying to install truffle

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’]
npm ERR! stack:
npm ERR! ‘Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules’ }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/victorvelasco/.npm/_logs/2019-06-07T18_04_52_521Z-debug.log

I am beginner in terminal and I don´t know what to do.
Happy weekend from Spain

I neither don’t know how to reinstall npm and node.

These are my folders in user and in library (in case it is needed to solve the issue)

I have download the proofofexistance protocol from their GitHub, could that be the origin of the problem???
Again thanks and happy day!

Wow finally I have managed to solve the problem with this video:

It was no easy but the reward of getting truffle install is amazing:

Awesome!! So everything is working?

Great job on googling for your issue :slight_smile:

Everything is working man! I appreciate your great job comment is very rewardable.

Keep codling lol.

1 Like

Arg, my brain is melting. I have looked at too many things and am chasing my tail around in circles, trying to get truffle working on Windows. :confused:

It took me ages to get npm working, as the path wasn’t in my environmental variables, seems like a hollow victory at the moment.

when I try and initialise truffle I get…

PS C:\Program Files\nodejs> truffle init
internal/modules/cjs/loader.js:1023
throw err;
^

Error: Cannot find module ‘C:\Users\username\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js’
e[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)e[39m
e[90m at Function.Module._load (internal/modules/cjs/loader.js:890:27)e[39m
e[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)e[39m
e[90m at internal/main/run_main_module.js:17:47e[39m {
code: e[32m’MODULE_NOT_FOUND’e[39m,
requireStack: []
}

From what I can see there is json file in the expected location. I have tried unisintalling and reinstalling trruffle and a bunch of other things. If @filip or anyone else could help me while I have a sliver of sanity left I would be very grateful! :slight_smile: