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

Availability of node-gyp in build version of dockers #45

Closed
sandeepzgk opened this issue Jul 11, 2017 · 6 comments
Closed

Availability of node-gyp in build version of dockers #45

sandeepzgk opened this issue Jul 11, 2017 · 6 comments

Comments

@sandeepzgk
Copy link

One important artifact that is missing from the lambda docker build image is node-gyp

@mhart
Copy link
Member

mhart commented Jul 11, 2017

@sandeepzgk I'm not sure what you mean?

$ find / -name node-gyp
/var/lang/lib/node_modules/npm/bin/node-gyp-bin/node-gyp
/var/lang/lib/node_modules/npm/node_modules/node-gyp
/usr/local/lib64/node-v4.3.x/lib/node_modules/npm/bin/node-gyp-bin/node-gyp
/usr/local/lib64/node-v4.3.x/lib/node_modules/npm/node_modules/node-gyp

To show that it works with npm:

$ npm install hiredis

> hiredis@0.5.0 install /var/task/node_modules/hiredis
> node-gyp rebuild

make: Entering directory `/var/task/node_modules/hiredis/build'
  CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o
  AR(target) Release/obj.target/deps/hiredis-c.a
  COPY Release/hiredis-c.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
  CXX(target) Release/obj.target/hiredis/src/reader.o
  SOLINK_MODULE(target) Release/obj.target/hiredis.node
  COPY Release/hiredis.node
make: Leaving directory `/var/task/node_modules/hiredis/build'
/var/task
└─┬ hiredis@0.5.0 
  ├── bindings@1.2.1 
  └── nan@2.6.2 

@mhart
Copy link
Member

mhart commented Jul 11, 2017

Going to close this, because node-gyp is definitely in the Node.js build images – but if you're seeing a specific error that you think is from something missing, let me know and I'll be happy to reopen.

@mhart mhart closed this as completed Jul 11, 2017
@sandeepzgk
Copy link
Author

i am not able to use node-gyp on the build-node6.10 image. I am installing it manually.

@sandeepzgk
Copy link
Author

sandeepzgk commented Jul 18, 2017

Here are the custom things i find necessary that are missing in the lambci/lambda:build-nodejs6.10 image

npm install -g node-gyp
yum install wget -y
yum install curl-devel -y

@mhart
Copy link
Member

mhart commented Jul 18, 2017

@sandeepzgk it's already on the image. You can see it in use if you install a native dependency as I showed here: #45 (comment)

See the node-gyp rebuild step?

@mhart
Copy link
Member

mhart commented Jul 18, 2017

If you're having problems, please paste the output of running the following command:

docker run lambci/lambda:build-nodejs6.10 npm install hiredis

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