My environment is like below:
- Operating System: Ubuntu 20.04
- Node Version Manager: (v0.35.3)
- Node JS: v9.6.1
- NPM ( package manager ): 5.6.0
I have installed node-gyp like below:
npm install -g node-gyp
The installation is successful:
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/home/rando/.nvm/versions/node/v9.6.1/bin/node-gyp -> /home/rando/.nvm/versions/node/v9.6.1/lib/node_modules/node-gyp/bin/node-gyp.js
+ node-gyp@7.1.2
updated 1 package in 5.11s
I am trying to run a file makeRelease that fails at the last commands. The command that causes the execution of the file makeRelease to fail is: node-gyp rebuild . I have pasted the error below:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@9.6.1 | linux | x64
gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: ENOENT: no such file or directory, mkdir '/home/rando/.cache/node-gyp/9.6.1'
gyp ERR! System Linux 5.8.0-43-generic
gyp ERR! command "/home/rando/.nvm/versions/node/v9.6.1/bin/node" "/home/rando/.nvm/versions/node/v9.6.1/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/rando/Desktop/git/master-node/node/browser_engines/src/browsers/webkit
gyp ERR! node -v v9.6.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
I have tried to:
- reinstall the node-gyp package
- clear the cache
- delete package-lock.json and node modules folder and run npm install again.
- The node
build essentialsis installed. - reinstalling the node-gyp package with the unsafe flag (
npm i -g node-gyp --unsafe) -- reinstalling with unsafe flag and allow-root flag (npm i -g node-gyp --unsafe-perm=true --allow-root) - Also tried this workaround
npm config set user 0
npm config set unsafe-perm true
- This didn't work either:
npm install -g node-gyp node-pre-gyp
I will appreciate any help or guide in solving this issue.
Regards, Rando.