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.

Add `@prisma/prisma-fmt-wasm` to CLI and output dependency version in `-v`, use instead of Formatter Engine binary

See original GitHub issue

@prisma/prisma-fmt-wasm exists and can replace the Formatter Engine binary usage in Prisma CLI already.

  1. Add @prisma/prisma-fmt-wasm as dependency (requires CI changes)
  2. Output dependency package version in -v output of Prisma CLI
  3. Replace the format (and others) call of the Formatter Engine binary with a call to the Wasm module (in a separate PR)
  4. Test CLI Engine Crash Reporting along the way to make sure it also works properly with the Wasm module
  5. Profit 🚢

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
0gust1commented, Oct 19, 2022

@jkomyno Hi 👋 . Thanks for the follow-up! I’ll open an issue (it was on my today’s TODO, after my yesterday post on https://github.com/prisma/prisma/discussions/15859) and/or post on #15881. Expect some news in the next 6 hours.

Very quickly (those elements – and others – will be in the issue):
It’s a standalone project; I suspect that the azure deployment could “do things” to the node_modules folder; I still can’t completely rule out a problem on our own workflow. Reproductibility won’t be easy (as it will need an Azure account/subscription), but I’ll try.

1reaction
0gust1commented, Oct 18, 2022

We have the same kind of error as @jkomyno posted, when trying to run prisma migrate deploy on our target server.

node: 16.14.2 prisma: 4.4.0 env: Azure AppService (“classic” zip deploy)

Error: ENOENT: no such file or directory, open '/home/site/wwwroot/node_modules/.bin/prisma_fmt_build_bg.wasm'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at ../../node_modules/.pnpm/@prisma+prisma-fmt-wasm@4.4.0-66.f352a33b70356f46311da8b00d83386dd9f145d6/node_modules/@prisma/prisma-fmt-wasm/src/prisma_fmt_build.js (/home/site/wwwroot/node_modules/.bin/prisma:12337:31)
    at __require (/home/site/wwwroot/node_modules/.bin/prisma:14:50)
    at Object.<anonymous> (/home/site/wwwroot/node_modules/.bin/prisma:86202:38)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/site/wwwroot/node_modules/.bin/prisma_fmt_build_bg.wasm'
}

In node_modules/@prisma/engines we have the correct engines (prisma-fmt-debian-openssl-1.1.x in our case), but it keep searching for a wasm module, at the wrong place (node_modules/.bin/prisma_fmt_build_bg.wasm).
Everything works fine in a local development context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma 4.3.0 Release - GitClear
feat(cli): add @prisma/prisma-fmt-wasm to version command (#14760) ... dependency version in -v , use instead of Formatter Engine binary ...
Read more >
Prisma CLI Command Reference
The version command outputs information about your current prisma version, platform, and engine binaries. Options. The version command recognizes the following ...
Read more >
Command-Line Reference | Bazel
Use tuples instead of lists in depset elements. ... How to resolve aspect dependencies when the output format is one of {xml,proto,record}.
Read more >
@prisma/engines: Versions | Openbase
... Add @prisma/prisma-fmt-wasm to CLI and output dependency version in -v , use instead of Formatter Engine binary · Add jest snapshots for...
Read more >
Add a formatter - Pants build
If you are instead writing your own formatting logic inline, you can skip Step 1. In Step 4, you will not need to...
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