vercel/pkg errors on windows
See original GitHub issueNOTE: This is a “draft issue”, so it may not be actionable at this time. See below for more info.
Bug description
+ ./cli.exe --version
Error: Command failed with ENOENT: D:\snapshot\node_modules\@prisma\cli\introspection-engine-windows.exe --version
spawn D:\snapshot\node_modules\@prisma\cli\introspection-engine-windows.exe ENOENT
How to reproduce
NOTE: This only happens on GitHub Actions right now. NOTE: I don’t know when this bug was introduced yet, because of another bug.
npm i @prisma/cli
npm i -g pkg
pkg node_modules/@prisma/cli -t node12-win
./cli.exe version
Also see https://github.com/prisma/e2e-tests/runs/1092141690
Expected behavior
no error
Prisma information
–
Environment & setup
–
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Errors – Vercel Docs
A list of errors provided by Vercel CLI or the REST API, with details on how they occur and how to resolve them....
Read more >pkg - npm
This error can be caused by using NODE_OPTIONS variable with some bootstrap or node options causing conflicts with pkg. Some IDEs, such as...
Read more >Node.js Native Binary Compilation Using vercel/pkg - Pulumi
Let's take a look at how to use pkg and some issues we encountered on the way. Setting up pkg. 1 - Install....
Read more >Packaging Node App with pkg causes 'ENOENT' error, when ...
I'm trying to use the execFile command from child_process to run an executable. In my local computer/environment, everything works flawlessly, ...
Read more >pkg-exe-build - NPM Package Overview - Socket.dev
Configure Windows PKG package generated exe file icon and detailed information windows 平台下 配置图标及详细信息 使用 pkg 打包 生成 exe 文件 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is the reason I’m using
pkg
currently, since it just magically picks up everything without any extra steps needed and just works (well, except for this specific issue, but it looks like a specific commit in @prisma/cli broke the built binary on windows). The command is really justpkg node_modules/@prisma/cli
and that’s it.Ah yeah, it seems you need to use a bundler to concat it into a single file before running boxed node. There should be ways of including a binary through this as well, but then this probably needs a build matrix too. Thinking this through this def sounds trickier than expected, but is probably a requirement for all single-binary creations.