I am getting error while installing the framework7 cli


#1

I am getting the following error while running npm i framework7-cli cordova -g

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-darwin-x64.tar.gz
ERR! sharp EACCES: permission denied, open ‘/usr/local/lib/node_modules/framework7-cli/node_modules/sharp/9292-libvips-8.7.0-darwin-x64.tar.gz’
info sharp Attempting to build from source via node-gyp but this may fail due to the above error

Can someone help?


#2

You can try running it as root (e.g. sudo npm …) or maybe using the --unsafe-perm flag.


#3

I did use sudo and that error was from the command with sudo prepended to it. can you write down the whole command for --unsafe-perm


#4

sudo npm i framework7-cli cordova -g --unsafe-perm=true --allow-root


#5

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!


#6

Can you try to install latest node.js https://nodejs.org/en/


#7

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


#8

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


#9

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 :sunglasses:


#10

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

> [email protected] install /usr/lib/node_modules/framework7-cli/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

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

> [email protected] install /usr/lib/node_modules/framework7-cli/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

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


#11

It is working now having run:
sudo npm i framework7-cli cordova -g --unsafe-perm=true --allow-root

Thanks guys I have been on this the last 3days


#12

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.


#13

Looks like you have issues installing sharp library which is dependency, read their manual http://sharp.pixelplumbing.com/en/stable/install/#freebsd


[SOLVED] F7 Vue Offline, BackButton Events
#14

I am still getting the same error. Can someone help please?


#15

Hi. Read max solution. Im not suere it will help you. But i think he was having the same error as you.


#16

@pvtallulah is there a possible solution to this?


#17

I think so. Did yo try max solution?

sudo npm i framework7-cli -g --unsafe-perm=true --allow-root


#18

That worked after trying again. Maybe the fix was to manually remove the ~/.npm folder and doing this again. Thanks :slight_smile:


Framework7 CLI installations stops due to EACCESS error
#19

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?!! :joy: