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.

Allow to change engine directory

See original GitHub issue

Problem

I’m trying to integrate prisma with Bazel, but the main problem is that prisma downloads engine to /home/xnerhu/.cache/prisma/master/2452cc6313d52b8b9a96999ac0e974d0aedf88db/debian-openssl-1.1.x/libquery-engine directory. Bazel is a sandboxed environment and it throws Error: EROFS: read-only file system, which is expected.

Suggested solution

I’m asking to add an option to prisma generate CLI and the others to change path to engine directory.

Additional context

prisma generate --schema ./schema --engine ./engine

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CooperBillscommented, Mar 24, 2022

Done! I managed to get Prisma working with Bazel, and open sourced the rule here: https://github.com/CooperBills/rules_prisma - It’s currently pretty limited (it’s only a single prisma_js_library rule that generates the typescript/javascript client in a bazel-compatible way, but should work as a good starting point if more functionality is needed).

As for how it works, it turns out #3 from my comment above is also already happening, but in the @prisma/engines package (perhaps the prisma cli should check in @prisma/engines before trying to pull from the internet?). So my bazel rule references the engines from @prisma/engines and points the cli to them via environment variables.

0reactions
janpiocommented, Mar 24, 2022

(The engine download logic is a bit of a mess - as you might have noticed - and we are working on cleaning that up. Hopefully afterwards this will make a lot more sense and then also be able to be controlled more directly and cleanly.) Thanks for posting the workaround!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing Engine Directory - Getting Started & Setup
Hi there, I want to ensure this issue is not confused with changing the location for where the content/marketplace items are downloaded.
Read more >
How do I change the installation directory of the Epic Games ...
Type Add or Remove Programs and press Enter. Look for the Epic Games Launcher in the list of apps and click on it....
Read more >
Engine | Alteryx Help
The location where Server temporarily saves files associated with the workflow when you edit workflows stored in a Gallery. By default, Server ...
Read more >
Changing Directory Server password for IBM FileNet Content ...
Via ACCE, select the Domain, followed by the Directory Configuration tab and then the Name of the Directory Server. Scroll downward to the...
Read more >
Azure AD Connect sync: Make a change to the default ...
These steps are not required because the attribute values are flowing from on-premises Active Directory to Azure AD only. Step 7: Re-enable the ......
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