Here is the error now I am getting against this command sudo npm i framework7-cli cordova -g --unsafe-perm=true --allow-root
I am not sure if this is related to my node/npm installation but I do get these issues alot. Can you please suggest me a better way to debug and fix these issues and what may cause these issues to arise in the first place? Thank you!
I already have the latest version installed and some of the npm packages work just fine. Its some of them that dont wory. i.e, framework7-cli and cordova
My nodejs version is v10.13.0
I was having the same problem and found this searching the forum. I’m running node version 10.15 on Mac OS Mojave and using sudo along with the --unsafe-perm=true --allow-root options worked for me. Thanx @hellohello1
I had a similar problem after updating node.js to the latest version on OSX with Homebrew. Tried everything including --unsafe-perm, --allow-root options to adjusting directory rights with chown -R. I finally solved the problem by uninstalling node.js and re-installing the stable version (10.15.1) from this site that Vladimir already mentioned.
After that, the installation of framework7-cli worked smooth as advertised
I am also experiencing the same issue. I have tried the installation on both the latest stable(10.15…) and current (11.x…) versions but with no success.
Below is my terminal output:
sudo npm i -g framework7-cli /usr/bin/framework7 -> /usr/lib/node_modules/framework7-cli/index.js
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-linux-x64.tar.gz ERR! sharp EACCES: permission denied, open ‘/usr/lib/node_modules/framework7-cli/node_modules/sharp/32125-libvips-8.7.0-linux-x64.tar.gz’ info sharp Attempting to build from source via node-gyp but this may fail due to the above error info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/11.10.0” gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/lib/node_modules/framework7-cli/node_modules/sharp/.node-gyp” gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install
_gyp ERR! configure error _ gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/framework7-cli/node_modules/sharp/.node-gyp’ gyp ERR! System Linux 4.20.7-100.fc28.x86_64 gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /usr/lib/node_modules/framework7-cli/node_modules/sharp gyp ERR! node -v v11.10.0 gyp ERR! node-gyp -v v3.8.0
_gyp ERR! not ok _ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) npm ERR! Exit status 1
_npm ERR! _ npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
_npm ERR! /root/.npm/logs/2019-02-28T07_44_54_500Z-debug.log
sudo npm i -g framework7-cli /usr/bin/framework7 -> /usr/lib/node_modules/framework7-cli/index.js
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-linux-x64.tar.gz ERR! sharp EACCES: permission denied, open ‘/usr/lib/node_modules/framework7-cli/node_modules/sharp/32125-libvips-8.7.0-linux-x64.tar.gz’ info sharp Attempting to build from source via node-gyp but this may fail due to the above error info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/11.10.0” gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/lib/node_modules/framework7-cli/node_modules/sharp/.node-gyp” gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install
_gyp ERR! configure error _ gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/framework7-cli/node_modules/sharp/.node-gyp’ gyp ERR! System Linux 4.20.7-100.fc28.x86_64 gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /usr/lib/node_modules/framework7-cli/node_modules/sharp gyp ERR! node -v v11.10.0 gyp ERR! node-gyp -v v3.8.0
_gyp ERR! not ok _ npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) npm ERR! Exit status 1
_npm ERR! _ npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
_npm ERR! /root/.npm/logs/2019-02-28T07_44_54_500Z-debug.log
Can someone find out the cause of this issue? I have tried everything that is mentioned in this post about this issue. The npm clear cache is not deleting the folder (.npm) on the home (~/) folder. I had to manually delete that folder and run the commands.
Hello everyone, sudo npm install -g framework7-cli --unsafe-perm=true --allow-root helped. Did not work for me without flag. Also, noticed too, that i was not connected to internet, when running either command… Duh?!!