Error! No available node version satisfies 'node11'
kearfy opened this issue · comments
Hey all,
Im trying to pack my console application into an executable,
im running windows 10 x64.
Ive tried to reinstall node v11.3.0 for about 3 times.
pkg .
will output:
> pkg@4.3.5
> Targets not specified. Assuming:
node11-linux-x64, node11-macos-x64, node11-win-x64
> Error! No available node version satisfies 'node11'
node -v
will output:
v11.3.0
ive searched around for a bit and didnt found a solution for this issue, i hope somebody can solve it...
Micha de Vries
use node 10.12.0... is lts
Yeah that worked, thnx
While using an older version of Node may work, it's not a proper fix for this issue.
that is a very good point...
While using an older version of Node may work, it's not a proper fix for this issue.
but node 11 is not a stable version.
Is there any option to switch to non-lts versions?
you will probably have to ask the developers.
Also having this issue, but switching to 10.12 won't work for me, because I'm using a feature that was added in 11.4
using pkg command with option like "--targets=node10-win-x64" wll temporarily solve the problem
I use this in my package.json
"pkg": {
"scripts": "*.js",
"assets": "www/**/*",
"targets": [
"node10"
]
}
Using nvm.sh to switch back to node 10.x. Just a temperary workaround..
It worked for me with node v10.15.0
Sadagour yes, but that diesnt solve the issue... Its just a work ariund, and not all plugins from node 11 will work on node 10.15.0
Any updates for those who need node v11?
i got no idea honestly, havent touched nodejs in a while
Bump for node 12. What need to happen in order to get modern node version?
I need this work Workers.
I've created a pull request vercel/pkg-fetch#65 for Node 12.1.0 support.
Still getting this error with node version v11.10.0.
Works for me! After adding node10 in pkg targets... pay close attention to the version numbers pkg is putting out. I discovered I had different versions if I entered pkg
versus if I did npm run pkg
LINUX
> pkg@4.4.0
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v10.15.3-linux-x64 [============= ] 64%
Still not working
node --version
v11.13.0
pkg .
> pkg@4.4.0
> Targets not specified. Assuming:
node11-linux-x64, node11-macos-x64, node11-win-x64
> Error! No available node version satisfies 'node11'
Same error after upgrading to node13
pkg .
> pkg@4.4.0
> Targets not specified. Assuming:
node13-linux-x64, node13-macos-x64, node13-win-x64
> Error! No available node version satisfies 'node13'
Putting
"pkg": {
"targets": [
"node10"
]
},
in package.json works as a fix for now...
Doesn't look like Zeit has anyone actively working on this. Last commit was in May and there are 12 pull requests. Sad times!
So what's the best alternative (sorry it's not related to this issue)
@zoutepopcorn , maybe Nexe?
https://github.com/nexe/nexe
Even after 1 year, 1 LTS and 2 NodeJS versions overall this issue hasn't been solved yet! When will the attention of the developers be brought to this issue?
@kearfy , maybe we need better documentation to dev contributors, on how pkg
works inside, so the community can help maintaining it.
I would very much like support for latest node version too. Currently running 13.3.0.
This is related to #838 (comment)
I opened an issue on pkg-fetch
(here https://github.com/zeit/pkg-fetch/issues/78) asking for instructions on how we can help bringing new NodeJS versions to it.
my pkg version is 4.4.0, I had same error at nodeJS v11
Then I installed nodeJS 12.16.1, and it worked
`
PS F:\Data\TestNodeJS> node --version
v12.16.1
PS F:\Data\TestNodeJS> pkg .
pkg@4.4.4
Targets not specified. Assuming:
node12-linux-x64, node12-macos-x64, node12-win-x64
Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v12.13.1-linux-x64 [====================] 100%
fetched-v12.13.1-win-x64 [====================] 100%
fetched-v12.13.1-macos-x64 [====================] 100%`
In the meantime, I suggest everyone on this thread to use v12
Maybe this can help someone: https://github.com/robertsLando/pkg-binaries
Support will be for Node 12 and 14 going forward. Thanks!
case is closed, but issue remains:
v14.16.1 is already installed.
Now using node v14.16.1 (npm v6.14.12)
➜ test pkg index.js --target macos --output pkgtest
> pkg@4.4.2
> Error! No available node version satisfies 'node14'
pkg is not downloading node.js any version. Why is this closed? I have system nodejs v16.3.0 but pkg still fails with
pkg@4.4.8
Error! No available node version satisfies 'node16'
No available node version satisfies 'node13'
ah you just gotta love the Javascript ecosystem where absolutely nothing ever works.
Hey guys! I just stumbled across this issue trying to use pkg with node16. I got the same erorr, but the problem was completely different than everything described here, so I wanted to share. I had npm previously installed on Windows and was now using it in wsl2. I was trying to update pkg to the newest version to check if that will solve the problem, but somehow running pkg --version
the version stayed the same, no matter what I tried. Running which pkg
I figured out, that my wsl was actually using the pkg I had previously installed under Windows in AppData/npm
. Removing that ended my systems confusion and after a fresh install of the newest pkg version everything is compiling just fine.