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

Bug in target version for napi #1695

Closed
rightaway opened this issue Jul 13, 2022 · 0 comments
Closed

Bug in target version for napi #1695

rightaway opened this issue Jul 13, 2022 · 0 comments

Comments

@rightaway
Copy link

What version of pkg are you using?

5.7.0

What version of Node.js are you using?

16.15.0

What operating system are you using?

linux

What CPU architecture are you using?

amd64

What Node versions, OSs and CPU architectures are you building for?

node16-linux-64

Describe the Bug

I get these warnings when I run pkg with sharp as a dependency.

prebuild-install WARN This package does not support N-API version v16.15.0
prebuild-install WARN install No prebuilt binaries found (target=v16.15.0 runtime=napi arch=x64 libc= platform=linux)

@lovell the maintainer of sharp says it's a bug in pkg in

pkg/lib/producer.ts

Lines 228 to 229 in 62f6da9

'--target',
nodeVersion,
because it is hard-coding the target to be the version of Node.js, which is incorrect when the runtime is napi. lovell/sharp#3289 (comment)

To Reproduce

Run pkg with sharp as a dependency. With latest version 0.30.7 there are warnings but not with older version 0.27.2.

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

2 participants