bunx prisma init
Error: Cannot find module 'C:\Users\Damian\AppData\Local\Temp@prisma\cli-init@latest-1747432800000\node_modules@prisma\cli-init\dist\index.js' imported from C:\Users\Damian\Desktop\all-make\node_modules\prisma\build\index.js
2 Replies
You opted for speed from this bot. Let's conjure up an answer right now!
The error you’re seeing with
This error is likely due to Bun’s incomplete compatibility with Prisma’s CLI tooling. The recommended solution is to use Node.js (LTS) for running Prisma CLI commands. If you must use Bun, ensure you are on the latest version, but be aware that full compatibility is not guaranteed yet. If you need further troubleshooting, please provide your Bun and Prisma versions, and consider running the command with Node.js to confirm if the issue is specific to Bun. 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
bunx prisma init
:
is not directly documented in the provided knowledge sources. However, there are several related issues with running Prisma CLI commands using Bun, especially with bunx
or in certain environments.
Key points from the knowledge sources:
- Bun’s compatibility with Prisma is still evolving. Many users have reported issues with missing modules, silent failures, or commands not working as expected when using Bun instead of Node.js. In several cases, the root cause is Bun’s incomplete Node.js API support or differences in how it handles module resolution and CLI execution compared to Node.js. For example, some errors are due to Bun not supporting all Node.js APIs that Prisma relies on, or due to issues with how Bun resolves paths for CLI binaries and temporary files Using BunJS always returns Error: undefined, bunx prisma generate breaking.
- A common workaround is to use Node.js (preferably an LTS version) to run Prisma CLI commands, as this avoids many of the compatibility issues seen with Bun. Several users have reported that simply installing Node.js and running the same Prisma commands with npx
or directly with Node.js resolves these errors bunx prisma generate breaking.
- Some issues have been fixed in newer versions of Bun, so upgrading Bun to the latest version may help. However, if the problem persists, falling back to Node.js is the recommended solution Prisma Cli not working on the latest version.
Summary:This error is likely due to Bun’s incomplete compatibility with Prisma’s CLI tooling. The recommended solution is to use Node.js (LTS) for running Prisma CLI commands. If you must use Bun, ensure you are on the latest version, but be aware that full compatibility is not guaranteed yet. If you need further troubleshooting, please provide your Bun and Prisma versions, and consider running the command with Node.js to confirm if the issue is specific to Bun. 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
Continuing conversation in the other thread