dappuniversity / token_sale

Code Your Own Cryptocurrency & ICO on Ethereum | Tutorial
406 stars 387 forks source link

Truffle for Mac 14.5.0 install troubles #67

Open pdubb308 opened 2 months ago

pdubb308 commented 2 months ago

Im having trouble installing truffle for my Mac M2. Its running 14.5.0.

npm install -g truffle 5.0.2

ive tried to install also ive tried root/Administrator as well but it keeps giving me this error message

does anybody have any pointers?

npm error code EACCES npm error syscall mkdir npm error path /usr/local/lib/node_modules/truffle npm error errno -13 npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/truffle' npm error at async mkdir (node:internal/fs/promises:858:10) npm error at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:624:20 npm error at async Promise.allSettled (index 0) npm error at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11) npm error at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5) npm error at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5) npm error at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:74:5) { npm error errno: -13, npm error code: 'EACCES', npm error syscall: 'mkdir', npm error path: '/usr/local/lib/node_modules/truffle' npm error } npm error npm error The operation was rejected by your operating system. npm error It is likely you do not have the permissions to access this file as the current user npm error npm error If you believe this might be a permissions issue, please double-check the npm error permissions of the file and its containing directories, or try running npm error the command again as root/Administrator.

npm error A complete log of this run can be found in: /Users/prestonlofton/.npm/_logs/2024-07-10T00_18_19_025Z-debug-0.log prestonlofton@Prestons-Air ~ % npm install -g truffle root/Administrator npm error code 128 npm error An unknown git error occurred npm error command git --no-replace-objects ls-remote ssh://git@github.com/root/Administrator.git npm error git@github.com: Permission denied (publickey). npm error fatal: Could not read from remote repository. npm error npm error Please make sure you have the correct access rights npm error and the repository exists.

npm error A complete log of this run can be found in: /Users/prestonlofton/.npm/_logs/2024-07-10T00_18_57_696Z-debug-0.log