Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

iojs-full without upgraded npm #1

Closed
mickhansen opened this issue Apr 16, 2015 · 9 comments
Closed

iojs-full without upgraded npm #1

mickhansen opened this issue Apr 16, 2015 · 9 comments

Comments

@mickhansen
Copy link

node-gyp will fail in a lot of cases if one doesn't use the npm bundled with iojs.
It would be great to be able to use your alpine-iojs package but without the npm update -g npm part here: https://github.com/mhart/alpine-node/blob/master/Dockerfile.full#L21

@mhart
Copy link
Owner

mhart commented Apr 16, 2015

That's a bit strange – so you can't update npm at all? That sounds like a bug with npm and/or io.js – why would it suddenly stop working if it updates?

You sure that node-gyp works fine on Alpine Linux in the first place? I suspected that musl libc prevented many native modules from building at all.

Have you got an easy way to reproduce this?

@mickhansen
Copy link
Author

I can use npm, i can't use packages that use node-gyp. It's a bug with node-gyp that's fixed in the npm version bunded with io.js. (nodejs/node-gyp#564, nodejs/node#433)

It works just fine if i copy your dockerfile and remove the npm update -g npm part. (and install a few extra packages).

Repro something like:

FROM mhart/alpine-iojs

RUN apk add python openssl libgcc make libstdc++ apk add g++
RUN npm install ursa

@mickhansen
Copy link
Author

Although now i end up with a 400mb image, so not a huge gain anymore.

@mhart
Copy link
Owner

mhart commented Apr 16, 2015

Ok cool – I'll look into this and let you know if I come up with something better!

@mickhansen
Copy link
Author

I think that removing the npm upgrade and letting users do it themselves seems fine, but that's up to you obviously.

@mhart
Copy link
Owner

mhart commented Apr 16, 2015

Well I think a solution that allows the latest version of npm is best – I mean, it doesn't make sense to have to be stuck on an old version and not be able to upgrade.

@mickhansen
Copy link
Author

Of course, but the user can always run npm update -g npm on his own if he so wishes (without having to affect other people who need the bundled version for node-gyp).
iojs moves pretty fast and there's usually a pretty new npm bundled with it (1.7.1 has the private repos npm installed for one).

@mhart mhart closed this as completed in f838db9 Apr 16, 2015
@mhart
Copy link
Owner

mhart commented Apr 16, 2015

Well, I've rebuilt and pushed as mhart/alpine-iojs with tags latest, 1.7 and 1.7.1 – let me know if that fixes it for you.

@mickhansen
Copy link
Author

It does, thank you.

PetarKirov pushed a commit to PetarKirov/alpine-node that referenced this issue Nov 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants