0

I've followed the instructions verbatim to install gauge from "https://gauge.org/getting-started-guide/quick-install/" and I'm unable to install it.

I'm starting from a fresh GCP Debian instance. After installing the NodeJS PPM and then following the instructions, "gauge" is installing a blank file under /usr/lib/node_modules/@getgauge/cli/bin. I'm getting the following file permission error. This is all run as root.

root@instance-1:~# npm -v
6.9.0
root@instance-1:~# node -v
v10.16.3
root@instance-1:~# npm install -g npm@latest
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
+ npm@6.11.2
added 19 packages from 13 contributors, removed 15 packages and updated 53 packages in 6.895s
root@instance-1:~# npm install -g @getgauge/cli
/usr/bin/gauge -> /usr/lib/node_modules/@getgauge/cli/bin/gauge

> @getgauge/cli@1.0.5 install /usr/lib/node_modules/@getgauge/cli
> node ./src/index.js

Fetching download url for Gauge version 1.0.5
Downloading https://github.com/getgauge/gauge/releases/download/v1.0.5/gauge-1.0.5-linux.x86_64.zip to ./bin
{ [Error: EACCES: permission denied, open 'bin/gauge'] errno: -13, code: 'EACCES', syscall: 'open', path: 'bin/gauge' }
+ @getgauge/cli@1.0.5
added 83 packages from 76 contributors in 6.48s

Version information

root@gauge:~/gaugetest$ npm -v
6.11.2
root@gauge:~/gaugetest$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.9 (stretch)
Release:        9.9
Codename:       stretch

Any ideas?

Luke
  • 156
  • 3
  • Try running `npm install` with `sudo`? Have you tried that? – ifconfig Aug 26 '19 at 03:38
  • As I said in the post, everything was run as "root". But I originally ran everything as "sudo" and got the same results. – Luke Aug 27 '19 at 01:44
  • Try this? https://stackoverflow.com/questions/48910876/error-eacces-permission-denied-access-usr-local-lib-node-modules-react – ifconfig Aug 27 '19 at 02:23

1 Answers1

0

npm changes the uid to the user account or uid specified by the user config when invoked with root privileges, which defaults to nobody. Set the unsafe-perm flag to run scripts with root privileges. In your case you can try npm run @getgauge/cli --uynsafe-perm

bugdiver
  • 26
  • 2