nuejs / create-nue

A recommended way to start a Nue project
https://nuejs.org
139 stars 30 forks source link

[BUG] Does not detect bun #7

Closed octoshrimpy closed 9 months ago

octoshrimpy commented 1 year ago

using bun to run, it still says "no builder found (esbuild or Bun)" image

nerbl commented 1 year ago

I have the same error via bun run start but was able to get it going via:

npm install --prefix . bun
node_modules/.bin/bun install
node_modules/.bin/bun --bun start
kon-pas commented 1 year ago

Use the --bun flag, like so:

bun --bun start

This would be the whole Bun setup equivalent:

git clone https://github.com/nuejs/create-nue.git
cd create-nue
bun install
bun --bun start
open "http://localhost:8080"

This issue is caused by the Node shebang (#!/usr/bin/env node) in the script. Bun respects it and executes the script using Node. We have to explicitly override it, hence the --bun flag.

tipiirai commented 11 months ago

Thank you @kon-pas for this!

tipiirai commented 9 months ago

Closing this one, since this issue relates to the original/outdated version