You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
I recently converted an npm CLI I ship from CommonJS to ES Modules, dropping support for node 10 in the process. Now when I run pkg, I am getting the following error:
linkinator (main) $ npm run build-binaries
> linkinator@0.0.0 build-binaries
> pkg . --out-path build/binaries
> pkg@5.4.1
> Targets not specified. Assuming:
node16-linux-x64, node16-macos-x64, node16-win-x64
> Warning Babel parse has failed: import.meta may appear only with 'sourceType: "module"' (11:69)
> Error! Cannot read file, ENOENT
node:path
I do use import.meta in the code, as I'm targeting node.js 12 and above where this should be available. I've also set "type": "module" in my package.json to signal that this is an esm module.
Expected Behavior
I would expect it to not throw an error :)
To Reproduce
To reproduce this, using the latest version of Node.js 16.x:
git clone https://github.com/JustinBeckwith/linkinator
cd linkinator
npm install
npm run build-binaries
The text was updated successfully, but these errors were encountered:
What version of pkg are you using?
5.4.1
What version of Node.js are you using?
16.13.0
What operating system are you using?
macOS
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node16-linux-x64, node16-macos-x64, node16-win-x64
Describe the Bug
I recently converted an npm CLI I ship from CommonJS to ES Modules, dropping support for node 10 in the process. Now when I run pkg, I am getting the following error:
I do use
import.meta
in the code, as I'm targeting node.js 12 and above where this should be available. I've also set"type": "module"
in mypackage.json
to signal that this is an esm module.Expected Behavior
I would expect it to not throw an error :)
To Reproduce
To reproduce this, using the latest version of Node.js 16.x:
The text was updated successfully, but these errors were encountered: