0

angular アプリを https ポート 443 経由で使用する必要があります。そのためには、ngroot として実行する必要があります。ただし、Angular CLI をルートとしてインストールすることはできません。助言がありますか?

root@develop:~# n v9.4.0

     install : node-v9.4.0
       mkdir : /root/n/n/versions/node/9.4.0
       fetch : https://nodejs.org/dist/v9.4.0/node-v9.4.0-linux-x64.tar.gz
######################################################################### 100.0%
   installed : v9.4.0

root@develop:~# npm install -g @angular/cli
/root/n/bin/ng -> /root/n/lib/node_modules/@angular/cli/bin/ng

> @angular/cli@8.2.0 postinstall /root/n/lib/node_modules/@angular/cli
> node ./bin/postinstall/script.js

sh: 1: node: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @angular/cli@8.2.0 postinstall: `node ./bin/postinstall/script.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @angular/cli@8.2.0 postinstall 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!     /root/.npm/_logs/2019-08-07T14_07_14_142Z-debug.log
4

1 に答える 1