angle
angle copied to clipboard
cannot install globally on linux
Looks like it tries to perform some operations not through the current user context (root in that case)
$ sudo npm i -g angle
/usr/local/bin/angle -> /usr/local/lib/node_modules/angle/index.js
> [email protected] postinstall /usr/local/lib/node_modules/angle/node_modules/spawn-sync
> node postinstall
> [email protected] postinstall /usr/local/lib/node_modules/angle/node_modules/aframe-registry
> npm run config
> [email protected] config /usr/local/lib/node_modules/angle/node_modules/aframe-registry
> shx cp -n scripts/templates/config.local.js scripts
cp: copyFileSync: could not write to dest file (code=EACCES):scripts/config.local.js
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] config: `shx cp -n scripts/templates/config.local.js scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] config script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/naugtur/.config │
└───────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR! /home/naugtur/.npm/_logs/2017-09-29T09_39_32_482Z-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/angle/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 ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run config`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /home/naugtur/.npm/_logs/2017-09-29T09_39_36_394Z-debug.log
@naugtur Hello!
cp: copyFileSync: could not write to dest file (code=EACCES):scripts/config.local.js
- try use yarn or npmc instead npm
- other npm global package woks well?
- install nvm - node version manager
I'm using latest npm and plenty of other packages work. I'm a heavy user of node. Didn't dig into details of this one but the postinstall script is doing something odd, because even if I run it from the root account with ultimate permissions to everything it reports the same error. Maybe the path doesn't exist or there's a folder where it tries to create a file.
I worked around the issue by installing locally in the project and using npm scripts.
Zb
On Oct 3, 2017, 14:44, at 14:44, Mike [email protected] wrote:
@naugtur Hello!
cp: copyFileSync: could not write to dest file (code=EACCES):scripts/config.local.js
- try use yarn or npmc instead npm
- other npm global package woks well?
- install nvm - node version manager
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/ngokevin/angle/issues/39#issuecomment-333829852
I`d try to remove some packages like shx
and make PR, but major developer have own point of view and have no time.
Each aframe projects useing shx
, gh-pages
pkgs, as I see.
- try remove
shx
- rewrite
angle
;-)
Getting this problem too on MacOS 10.13.12
Running
sudo npm install -g angle
with node 8.9.4 and npm 5.6.0
Getting this problem too on MacOS 10.13.6 workaround from 7dir helped npm install -g yarn yarn global add angle angle initcomponent
same problem MacOS 10.15.6