I’m on Ubuntu 16.04 LTS
# npm install elm -g
/usr/bin/elm -> /usr/lib/node_modules/elm/bin/elm
> elm@0.19.0-no-deps install /usr/lib/node_modules/elm
> node install.js
-- ERROR -----------------------------------------------------------------------
I had some trouble writing file to disk. It is saying:
Error: EACCES: permission denied, open '/usr/lib/node_modules/elm/bin/elm'
NOTE: You can avoid npm entirely by downloading directly from:
https://github.com/elm/compiler/releases/download/0.19.0/binary-for-linux-64-bit
.gz
All this package does is download that file and put it somewhere.
--------------------------------------------------------------------------------
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elm@0.19.0-no-deps install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elm@0.19.0-no-deps install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-20T14_46_39_334Z-debug.log
Here’s the log:
68 silly install elm@0.19.0-no-deps
69 info lifecycle elm@0.19.0-no-deps~install: elm@0.19.0-no-deps
70 verbose lifecycle elm@0.19.0-no-deps~install: unsafe-perm in lifecycle false
71 verbose lifecycle elm@0.19.0-no-deps~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/node_modules/elm/node_modules/.bin:/usr/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
72 verbose lifecycle elm@0.19.0-no-deps~install: CWD: /usr/lib/node_modules/elm
73 silly lifecycle elm@0.19.0-no-deps~install: Args: [ ‘-c’, ‘node install.js’ ]
74 silly lifecycle elm@0.19.0-no-deps~install: Returned: code: 1 signal: null
75 info lifecycle elm@0.19.0-no-deps~install: Failed to exec install script
76 timing action:install Completed in 2124ms
77 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
78 timing stage:rollbackFailedOptional Completed in 8ms
79 timing stage:runTopLevelLifecycles Completed in 2292ms
80 verbose stack Error: elm@0.19.0-no-deps install: node install.js
80 verbose stack Exit status 1
80 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)
80 verbose stack at EventEmitter.emit (events.js:209:13)
80 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
80 verbose stack at ChildProcess.emit (events.js:209:13)
80 verbose stack at maybeClose (internal/child_process.js:1021:16)
80 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
81 verbose pkgid elm@0.19.0-no-deps
82 verbose cwd /root
83 verbose Linux 4.15.0-64-generic
84 verbose argv “/usr/bin/node” “/usr/bin/npm” “install” “elm” “-g”
85 verbose node v12.10.0
86 verbose npm v6.10.3
87 error code ELIFECYCLE
88 error errno 1
89 error elm@0.19.0-no-deps install: node install.js
89 error Exit status 1
90 error Failed at the elm@0.19.0-no-deps install script.
90 error This is probably not a problem with npm. There is likely additional logging output above.
91 verbose exit [ 1, true ]
Here’s my system info:
# nodejs --version
v12.10.0
# npm --version
6.10.3