I'm new and trying to install PIA Front and back for work ! So i follow the runbook in the first hand.
But near the end I struggle a lot with npm install, the only command given in the runbook is:
cd pia
sudo npm install npm@latest -g
sudo npm install -g @angular/cli
Which i did but i have some error with the angular/cli (but not the fisrt one) see below:
@weblinux-pia:~/pia$ sudo npm install -g @angular/cli
/usr/bin/ng -> /usr/lib/node_modules/@angular/cli/bin/ng
> [email protected] install /usr/lib/node_modules/@angular/cli/node_modules/node-sass
> node scripts/install.js
Unable to save binary /usr/lib/node_modules/@angular/cli/node_modules/node-sass/vendor/linux-x64-59 : { Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@angular/cli/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:909:18)
at sync (/usr/lib/node_modules/@angular/cli/node_modules/mkdirp/index.js:71:13)
at Function.sync (/usr/lib/node_modules/@angular/cli/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/usr/lib/node_modules/@angular/cli/node_modules/node-sass/scripts/install.js:114:11)
at Object.<anonymous> (/usr/lib/node_modules/@angular/cli/node_modules/node-sass/scripts/install.js:157:1)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/lib/node_modules/@angular/cli/node_modules/node-sass/vendor' }
> [email protected] postinstall /usr/lib/node_modules/@angular/cli/node_modules/node-sass
> node scripts/build.js
Building: /usr/bin/node /usr/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli '/usr/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 9.9.0
gyp verb command install [ '9.9.0' ]
gyp verb install input version string "9.9.0"
gyp verb install installing version: 9.9.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 9.9.0
gyp verb build dir attempting to create "build" dir: /usr/lib/node_modules/@angular/cli/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/@angular/cli/node_modules/node-sass/build'
gyp ERR! System Linux 4.4.0-87-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/lib/node_modules/@angular/cli/node_modules/node-sass
gyp ERR! node -v v9.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: `node scripts/build.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ @angular/[email protected]
updated 1 package in 21.643s
Can someone point me in the right direction ? I'm not very familiar with the npm/angular environnement, maybe the answer is basic.
LaBanane.