Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs npm error #127

Closed
vimagick opened this issue Jan 8, 2016 · 6 comments
Closed

nodejs npm error #127

vimagick opened this issue Jan 8, 2016 · 6 comments

Comments

@vimagick
Copy link

vimagick commented Jan 8, 2016

I'm trying run nodejs inside alpine docker container.
But npm doesn't work. Please help! Thank you!

$ docker pull alpine

$ docker run --rm -it alpine sh

>>> cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.3.1
PRETTY_NAME="Alpine Linux v3.3"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"

>>> apk add -U nodejs

>>> node --version
v4.2.4

>>> npm --version
2.14.12

>>> npm
Error: error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id
    at Error (native)
    at new Hash (crypto.js:50:18)
    at Object.Hash (crypto.js:49:12)
    at getDefaultSessionIdContext (_tls_wrap.js:27:19)
    at _tls_wrap.js:17:33
    at NativeModule.compile (node.js:954:5)
    at NativeModule.require (node.js:902:18)
    at tls.js:221:21
    at NativeModule.compile (node.js:954:5)
    at NativeModule.require (node.js:902:18)
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm"
npm ERR! node v4.2.4
npm ERR! npm  v2.14.12

npm ERR! error:26078067:engine routines:ENGINE_LIST_ADD:conflicting engine id
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https:/npm/npm/issues>
crypto.js:50
  this._handle = new binding.Hash(algorithm);
                 ^

Error: error:2606906E:engine routines:ENGINE_add:internal list error
    at Error (native)
    at new Hash (crypto.js:50:18)
    at Object.Hash (crypto.js:49:12)
    at md5hex (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:6:21)
    at getTmpname (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:15:27)
    at new WriteStream (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:31:22)
    at WriteStream (/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/index.js:26:12)
    at writeLogFile (/usr/lib/node_modules/npm/lib/utils/error-handler.js:394:14)
    at exit (/usr/lib/node_modules/npm/lib/utils/error-handler.js:80:28)
    at process.errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:385:3)
@ariddell
Copy link

ariddell commented Jan 8, 2016

I'm seeing this as well.

@paulrutter
Copy link

+1, i cannot build my Docker image right now...

I just noticed that it has something to do with (open)ssl. When using the ca-certificates package, be sure to run the "update-ca-certificates" before adding any other packages (in my case, "htop") to the docker image.

I haven't been able to exactly tell why this helps, but after calling "update-ca-certificates" first, all was well. Maybe someone with better knowledge of the alpine ecosystem can shed some light on this?

No, the issue is still there, so my previous comments can be ignored.

@ariddell
Copy link

ariddell commented Jan 8, 2016

@ariddell
Copy link

One can force alpine to install nodejs from alpine 3.2 with:

apk-install -X http://alpine.gliderlabs.com/alpine/v3.2/main 'nodejs<0.13'

@andyshinn
Copy link
Contributor

This should be fixed now upstream. Referenced at nodejs/node#4221 and http://git.alpinelinux.org/cgit/aports/commit/?id=30beca0f2f1de59e9fc8632d2807da50057217aa. Thanks @fabled.

@vimagick
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants