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

node-gyp fails to compile headdump package on build-tools image #440

Closed
amirhalatzi opened this issue Jun 9, 2020 · 1 comment
Closed

Comments

@amirhalatzi
Copy link
Contributor

amirhalatzi commented Jun 9, 2020

I tried installing a node package that depends on heapdump package, but node-gyp fails to find msbuild.

`FROM stefanscherer/node-windows:12.16.1-build-tools

npm i heapdump`

Apparently it should have used the x64 version.

To fix it, I've added the following to the Dockerfile:

ENV VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140" RUN npm config set msbuild_path='C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\msbuild.exe'

Any chance of adding it to the base Dockerfile? Or am I missing something altogether?

@StefanScherer
Copy link
Owner

Hi @amirhalatzi
I haven‘t used this image with node-gyp lately.
But your findings seem reasonable to me.
Could ould open a pull request with the fix?
This reminds me, we could also give the images some version bumps 😅

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

No branches or pull requests

2 participants