cannot install create-elm-app in node docker container
kiranpradeep opened this issue · 2 comments
Is this a bug report?
Yes.
Environment
node -v
: v13.2.0npm -v
: 6.13.1yarn --version
(if you use Yarn): Not using yarn.npm ls create-elm-app -g
(if you haven’t ejected): Not applicable.
Then, specify:
- Operating system: Host OS is Ubuntu 18.04. But using docker for consistent repro.
- Browser and version (if relevant): Not applicable.
Steps to Reproduce
- docker pull node:13.2.0-stretch
- docker run --rm -it node:13.2.0-stretch /bin/bash
- npm install -g create-elm-app
Expected Behavior
Successful installation.
Actual Behavior
root@764b2681f5c1:/# node -v
v13.2.0
root@764b2681f5c1:/# npm -v
6.13.1
root@764b2681f5c1:/# npm install -g create-elm-app
npm WARN deprecated fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated core-js@2.6.10: core-js@<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
/usr/local/bin/elm-app -> /usr/local/lib/node_modules/create-elm-app/bin/elm-app-cli.js
/usr/local/bin/create-elm-app -> /usr/local/lib/node_modules/create-elm-app/bin/create-elm-app-cli.jselmi-to-json@1.2.0 install /usr/local/lib/node_modules/create-elm-app/node_modules/elmi-to-json
binwrap-installERR Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/create-elm-app/node_modules/elmi-to-json/unpacked_bin'
at Object.mkdirSync (fs.js:839:3)
at /usr/local/lib/node_modules/create-elm-app/node_modules/binwrap/binstall.js:46:10
at new Promise ()
at untgz (/usr/local/lib/node_modules/create-elm-app/node_modules/binwrap/binstall.js:21:10)
at binstall (/usr/local/lib/node_modules/create-elm-app/node_modules/binwrap/binstall.js:11:12)
at install (/usr/local/lib/node_modules/create-elm-app/node_modules/binwrap/install.js:20:10)
at Object.install (/usr/local/lib/node_modules/create-elm-app/node_modules/binwrap/index.js:14:14)
at Object. (/usr/local/lib/node_modules/create-elm-app/node_modules/binwrap/bin/binwrap-install:18:9)
at Module._compile (internal/modules/cjs/loader.js:1121:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:67:12)
at internal/main/run_main_module.js:17:47 {
errno: -13,
syscall: 'mkdir',
code: 'EACCES',
path: '/usr/local/lib/node_modules/create-elm-app/node_modules/elmi-to-json/unpacked_bin'
}
npm WARN elm-webpack-loader@6.0.0 requires a peer of elm@0.19.0-no-deps || ^0.19.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/create-elm-app/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/create-elm-app/node_modules/elm-test/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elmi-to-json@1.2.0 install:binwrap-install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elmi-to-json@1.2.0 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! /root/.npm/_logs/2019-11-30T17_58_18_259Z-debug.log
Reproducible Demo
Used docker and so repro should be consistent on any machine.
Exaplanation.
This is not a blocker bug as we rarely use create-elm-app
in docker. What I wanted to show was, whenever I try installing create-elm-app
on a fresh Ubuntu machine as native app, the installation suceeds. But then would always hit #29 and always need to follow steps as per this comment to be unblocked.
I used docker to show a consistently reproducible way to repro my actual problem. But it failed during install itself inside docker. This installation issue could be result of poor installation script of a lesser used depdendent library. But the point I want to highlight, create-elm-app
installation and first use is a pain.
Please note that, npm install -g elm
is not recommened way to install as per elm npm page itself.
Closng as problem in binwrap.
Thanks for your feedback!