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

Error! No available node version satisfies 'node7' #331

Closed
nevf opened this issue Jan 17, 2018 · 13 comments
Closed

Error! No available node version satisfies 'node7' #331

nevf opened this issue Jan 17, 2018 · 13 comments

Comments

@nevf
Copy link

nevf commented Jan 17, 2018

I am getting the same error as #296

> pkg@4.3.0-beta.5
> Targets not specified. Assuming:
  node7-linux-x64, node7-macos-x64, node7-win-x64
> Error! No available node version satisfies 'node7'

and

C:\webapps\clibu>pkg server/clibu1.js --targets node7
> pkg@4.3.0-beta.5
> Error! No available node version satisfies 'node7'

On Windows 10 using nvm:

C:\webapps\clibu>node -v
v7.7.4
C:\webapps\clibu>nvm list

  * 7.7.4 (Currently using 64-bit executable)
    7.0.0

C:\webapps\clibu>pkg server/clibu1.js --targets node7.7.4
> pkg@4.3.0-beta.5
> Error! No available node version satisfies 'node7.7.4'
@nv4010
Copy link

nv4010 commented Mar 27, 2018

有解决办法了吗

@PlugIN73
Copy link

PlugIN73 commented Apr 6, 2018

I had the same issue. Now I installed node 9 by this instructions and run pkg:

$ pkg -t node9-linux .
> pkg@4.3.1
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v9.2.1-linux-x64     [====================] 100%
...

It works!

@nixklai
Copy link

nixklai commented Jun 24, 2018

I believe it is an issue with version 4.3.1. I had a similar issue but it is fixed once I update pkg to 4.3.3.

@we-zhang
Copy link

i'm using node9. Issue happened when node9+pkg 4.3.3. Works after downgrading to pkg 4.3.1

@savageautomate
Copy link

Experienced the same issue as @Weching using 4.3.3. Downgrading to 4.3.1 solved the problem.

@climam
Copy link

climam commented Jul 13, 2018

In pkg-fetch/lib/index.js, there is this piece of code:

`
function satisfyingNodeVersion () {

const versions = Object.keys(patchesJson)

  .filter((nv) => semver.satisfies(nv, nodeRange) ||
                  nodeRange === 'latest')

  .sort((nv1, nv2) => semver.gt(nv1, nv2));
return versions.pop();

}
`

So it means that only node versions where there are entries in patches.json can be used with pkg.

When looking at patches.json, there is only entries for "v10.4.1", "v8.11.3", "v8.9.0", "v6.11.5", "v4.8.5" and "v0.12.18".

Does that mean that node7 and node9 are not supported by pkg ?

@fasibio
Copy link

fasibio commented Jul 29, 2018

pkg dist/bundle.js --targets node9-alpine-x64 --output pkg/app works fine with 4.3.1 but does not work with current version 4.3.3
Error! No available node version satisfies 'node9'

@cmosboss
Copy link

Also getting this error, any idea?

@leozzyzheng
Copy link

4.3.4 still has this issue, finally I downgrade to 4.3.1 to make node9 works.

@michelem09
Copy link

I did the same, downgraded to 4.3.1 works

@Martinsos
Copy link

I have the same problem, node8 and node10 work but node9 does not.

@fasibio
Copy link

fasibio commented Dec 12, 2018

I does Not dry IT, but your next Product ncc can do The Same Job or?

@maticzav
Copy link

for future references, here's the list of supported versions:

{
  "v10.4.1": [
    "node.v10.4.1.cpp.patch"
  ],
  "v8.11.3": [
    "node.v8.11.3.cpp.patch"
  ],
  "v8.9.0": [
    "node.v8.9.0.cpp.patch"
  ],
  "v6.11.5": [
    "node.v6.11.5.cpp.patch"
  ],
  "v4.8.5": [
    "backport.R32768.patch",
    "backport.PR4777.for.N4.patch",
    "backport.PR5159.for.N4.patch",
    "backport.PR5343.for.N4.patch",
    "node.v4.8.5.cpp.patch"
  ],
  "v0.12.18": [
    "backport.R00000.patch",
    "backport.R24002.patch",
    "backport.R24204.patch",
    "backport.R24262.patch",
    "backport.R24266.patch",
    "backport.R24523.patch",
    "backport.R24543.patch",
    "backport.R24639.patch",
    "backport.R24642.patch",
    "backport.R24643.patch",
    "backport.R24644.patch",
    "backport.R24824.patch",
    "backport.R25039.patch",
    "backport.R25444.patch",
    "backport.PR4777.for.N0.patch",
    "backport.PR5343.for.N0.patch",
    "node.v0.12.18.cpp.patch"
  ]
}

taken from https://github.com/zeit/pkg-fetch/blob/master/patches/patches.json

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