Search code examples
node.jsnode-rednode-gyp

node-red - Installation stuck at gyp for bcrypt


I am running the following commands to install node-red on a AWS EC2 t2.micro instance.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs build-essential sudo npm install -g node-red

The installation seems to be in an infinite loop at this point: gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/node-red/node_modules/bcrypt/.node-gyp" gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/lib/node_modules/node-red/node_modules/bcrypt/.node-gyp/8.11.1"

If I hit Ctrl-C and rerun sudo npm install -g node-red then the installation seems to go through successfully. Is this valid behavior?


Solution

  • Try installing with the --unsafe-perm flag.