question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vercel/pkg errors on windows

See original GitHub issue

NOTE: 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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
steebchencommented, Oct 27, 2020

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 just pkg node_modules/@prisma/cli and that’s it.

0reactions
yoshuawuytscommented, Oct 27, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found