Next.js Discord

Discord Forum

Can I use npx alongside of bun?

Answered
Barbary Lion posted this in #help-forum
Open in Discord
Avatar
Barbary LionOP
I want to be able to use the bun package manager to install and run stuff like bun install, bun dev etc but some packages like Prisma can't be used with bunx yet since they use a node based version and so have to use something like npx to init prisma. What are my options?
Answered by joulev
i put the prisma command inside the scripts of package.json and can run bun on those commands just fine, bun will use the nodejs runtime for you

{
  "scripts": {
    "db:generate": "prisma generate"
  }
}

bun db:generate
View full answer

2 Replies

Avatar
i put the prisma command inside the scripts of package.json and can run bun on those commands just fine, bun will use the nodejs runtime for you

{
  "scripts": {
    "db:generate": "prisma generate"
  }
}

bun db:generate
Answer
Avatar
Barbary LionOP
Sweet! Thanks!