sharp EACCES: permission denied on CentOS/RHEL 7 – FIXED

A repair for sharp EACCES permission denied whereas putting in the nodejs package deal.

Whereas putting in the Browsertime Nodejs package deal I obtained the next error.

[root@gf-lab ~]# npm set up browsertime -g
/usr/bin/browsertime -> /usr/lib/node_modules/browsertime/bin/browsertime.js

> @sitespeed.io/[email protected] set up /usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/chromedriver
> node set up.js

(node:26690) UnhandledPromiseRejectionWarning: Error: Vacation spot Folder should exist
    at DownloaderHelper.__validate (/usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/chromedriver/node_modules/node-downloader-helper/dist/index.js:390:23)
    at new DownloaderHelper (/usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/chromedriver/node_modules/node-downloader-helper/dist/index.js:61:20)
    at obtain (/usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/chromedriver/set up.js:68:18)
(node:26690) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated both by throwing inside an async perform with out a catch block, or by rejecting a promise which was not dealt with with .catch(). (rejection id: 1)
(node:26690) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. Sooner or later, promise rejections that aren't dealt with will terminate the Node.js course of with a non-zero exit code.

> @sitespeed.io/[email protected] set up /usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/geckodriver
> node set up.js

(node:26701) UnhandledPromiseRejectionWarning: Error: Vacation spot Folder should exist
    at DownloaderHelper.__validate (/usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/geckodriver/node_modules/node-downloader-helper/dist/index.js:387:23)
    at new DownloaderHelper (/usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/geckodriver/node_modules/node-downloader-helper/dist/index.js:61:20)
    at obtain (/usr/lib/node_modules/browsertime/node_modules/@sitespeed.io/geckodriver/set up.js:73:18)
(node:26701) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated both by throwing inside an async perform with out a catch block, or by rejecting a promise which was not dealt with with .catch(). (rejection id: 1)
(node:26701) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. Sooner or later, promise rejections that aren't dealt with will terminate the Node.js course of with a non-zero exit code.

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

ERR! sharp EACCES: permission denied, mkdir '/root/.npm/_libvips'
data sharp Making an attempt to construct from supply by way of node-gyp however this will fail because of the above error
data sharp Please see https://sharp.pixelplumbing.com/web page/set up for required dependencies
gyp WARN EACCES consumer "root" doesn't have permission to entry the dev dir "/root/.node-gyp/11.15.0"
gyp WARN EACCES making an attempt to reinstall utilizing momentary dev dir "/usr/lib/node_modules/browsertime/node_modules/sharp/.node-gyp"
gyp WARN set up obtained an error, rolling again set up
gyp WARN set up obtained an error, rolling again set up
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/browsertime/node_modules/sharp/.node-gyp'
gyp ERR! System Linux 3.10.0-957.27.2.el7.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/browsertime/node_modules/sharp
gyp ERR! node -v v11.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not okay 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] set up: `(node set up/libvips && node set up/dll-copy && prebuild-install) || (node-gyp rebuild && node set up/dll-copy)`
npm ERR! Exit standing 1
npm ERR! 
npm ERR! Failed on the [email protected] set up script.
npm ERR! That is in all probability not an issue with npm. There's doubtless extra logging output above.

npm ERR! An entire log of this run might be present in:

I attempted just a few issues however nothing labored. After a little bit of looking I discovered npmjs documentation and gave it a strive --unsafe-perm flag.

npm set up --unsafe-perm

For instance: for my set up.

npm set up --unsafe-perm browsertime -g

It labored like a appeal. I hope it helps you too.

Rate this post
porno izle altyazılı porno porno