pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Change node version

Open Fastfinguh opened this issue 8 years ago • 10 comments

Is it possible to manually edit which version of node I'd use? If I use the command -t node-latest-win-x64 it downloads node 9.2.1 but the latest version is 9.5.0. Is there a possibility that I manually edit which version it downloads from https://nodejs.org/download/release/latest/ or do you need to update pkg itself

Fastfinguh avatar Feb 01 '18 22:02 Fastfinguh

+1

dotarmin avatar Feb 20 '18 19:02 dotarmin

+1

FredLuart avatar Mar 23 '18 10:03 FredLuart

+1. I am interested how to do it.

jpx83 avatar Mar 23 '18 13:03 jpx83

+1. This is particularly important when there is a security fix released in a new version of Node.js and we want to update asap.

Thanks.

denistn avatar Mar 26 '18 14:03 denistn

Hello @igorklopov , can you help us to reference the very latest version of Node.js to build up the packages? What are the steps? Thank you.

jpx83 avatar Apr 07 '18 21:04 jpx83

In case people are not aware, this is caused by a fundamental architecture decision of pkg.

pkg delegates the downloading/building of Node binaries to pkg-fetch, which pulls the closest matched runtimes from pkg-fetch releases and not from an official Node.js source.

This means that pkg-fetch will have to be updated with a new release before new versions of Node are available, and it means that users of pkg will have to trust the Node runtimes uploaded by zeit.

@igorklopov please correct me if I'm wrong. I'm investigating the use of pkg for use in our internal CI, and this is kind of a deal breaker.

adamkl avatar Apr 25 '18 20:04 adamkl

Looking a little further, if you choose to build Node from source, you can bypass the whole trust issue, as pkg-fetch will grab the source from the Node GitHub repo, but it still maps to a predefined list of Node versions. Which means you’ll need to wait on an update to pkg-fetch before you can get newer versions of Node.

It would be nice If we could provide an exact semver and grab the runtimes from Node’s own site.

adamkl avatar Apr 26 '18 00:04 adamkl

@denistn Agreed! This is critical to have for security.

Looks like pkg-fetch was built mainly for use in pkg. What may be the reason to maintain node binaries separately ? Is the binary maintained by pkg-fetch different from the official node binaries in some way ?

detj avatar Jul 04 '18 14:07 detj

I am also interested to have a workaround to build node binaries from specified source versions for use in pkg.

pdhar-tibco avatar Sep 25 '18 18:09 pdhar-tibco

@adamkl is right. with pkg we can't expose this option as we build node from source and modify it with patches. either you can build your own node or use what pkg provides. we are working on making upgrades more frequent and easier

hipstersmoothie avatar Mar 23 '21 16:03 hipstersmoothie