npm-Problem beim Versuch, Abhängigkeiten per npm zu installieren

npm-Problem beim Versuch, Abhängigkeiten per npm zu installieren
[email protected] install /home/ubuntu/blockchainpoc/hlpoc/node_modules/pkcs11js
> node-gyp rebuild

gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu/blockchainpoc/hlpoc/node_modules/pkcs11js/build'
gyp ERR! System Linux 4.4.0-1060-aws
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/blockchainpoc/hlpoc/node_modules/pkcs11js
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
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!     /home/ubuntu/.npm/_logs/2018-06-12T07_38_09_022Z-debug.log
  1. Ich verwende Node-Version 8.11.2

  2. Ich verwende npm Version 5.6.0

  3. Ich habe sudo verwendet, als ich npm install eingegeben habe

  4. Ich habe es komplett deinstalliert und dann mit den folgenden Befehlen erneut installiert

    sudo apt-get remove nodejs
    sudo apt-get remove npm
    
  5. Ich habe den Cache geleert und die Instanz neu gestartet

Antwort1

Ich habe das Problem gelöst, indem ich Gyp mit folgendem installiert habe:

pip install git+https://chromium.googlesource.com/external/gyp --user

Antwort2

Sie müssen Gyp mit Folgendem installieren:

apt-get install node-gyp

verwandte Informationen