The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Problem unboxing react from truffle
Hi, I am new here. I really need your support, on my journey as a blockchain developer. I am using UBUNTU 18.04 LTS. Whenever i try to unbox react from truffle i get this error display:
Unhandled rejection Error: EACCES: permission denied, mkdir ‘/home/zakari/.npm/_cacache/index-v5/d3/d0’
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zakari/.npm/_logs/2019-08-07T19_49_58_190Z-debug.log
at checkExecSyncError (child_process.js:621:11) at execSync (child_process.js:657:15) at Object.installBoxDependencies (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-box/lib/utils/unbox.js:118:1) at Object.setUpBox (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-box/lib/utils/index.js:62:1) at Object.unbox (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-box/box.js:64:1)
Truffle v5.0.26 (core: 5.0.26).
There were some problems with npm and global installs using sudo leaving behind files and folders owned by root.
The short version is run this to fix the ownership, then try your install again:
sudo chown -R $USER ~/.npm
Thank you. I will try it ASAP.
Thank you. I tried it and after installing using; sudo npm install --global gulp-cli.
Everything is working as it should. Thanks again.
There have been some fixes in recent versions of npm, so if you are able to update to the latest version then the ownership problem is unlikely to reoccur.
In particular, this version has the fix and the instruction to chown one last time after the npm upgrade: Release: 6.10.2