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

Use the provided npm from Node archive when npmVersion is not set #860

Closed
ndywicki opened this issue Nov 22, 2019 · 1 comment
Closed

Use the provided npm from Node archive when npmVersion is not set #860

ndywicki opened this issue Nov 22, 2019 · 1 comment

Comments

@ndywicki
Copy link

ndywicki commented Nov 22, 2019

Hi team,

We are behind a corporate firewall that block all .exe files and on our windows dev OS we can't install the NodeJs binary.

I see that if the npmVersion attribut is not set the plugin use instead of the win64 *.tar.gz and put the node.exe in ./node directory but not the npm binaries (npm and npm.cmd).

See NPMInstaller

Consequently plugin use the global npm bin and there are somes warn :

[INFO] npm WARN lifecycle The node binary used for scripts is C:\workspaces\sample\node\node.exe 
but npm is using C:\Program Files\nodejs\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

I make a trick to use a maven Ant task copy and play with the Maven lifecycles phase:

<copy file="node/node_modules/npm/bin/npm" todir="node"/>
<copy file="node/node_modules/npm/bin/npm.cmd" todir="node"/> 

but that's not the ideal.
Can you add an option to use and copy the npm binaries provided by the node archive even if the npmVersion is not set?

Regards,
Nicolas

@eirslett
Copy link
Owner

It's possible to upload the binaries to your internal Nexus repository (if you have one?) and download them from there instead, to circumvent the firewall.
Otherwise, I would suggest making an opening in the firewall, for fetching these binaries.

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