Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot initialize starter template #3551

Closed
Nanome203 opened this issue Oct 23, 2024 · 3 comments
Closed

Cannot initialize starter template #3551

Nanome203 opened this issue Oct 23, 2024 · 3 comments
Labels

Comments

@Nanome203
Copy link

Nanome203 commented Oct 23, 2024

What version of Hono are you using?

4.6.6

What runtime/platform is your app running on?

Bun

What steps can reproduce the bug?

bun create hono@latest hono-tutorial

Choose cloudfare-workers template
Agree to install dependencies
Choose bun as package manager

What is the expected behavior?

Starter template should get initialized

What do you see instead?

create-hono version 0.14.2
✔ Using target directory … hono-tutorial
? Which template do you want to use? cloudflare-workers
? Do you want to install project dependencies? yes
? Which package manager do you want to use? bun
✔ Cloning the template
⠋ Installing project dependencies31234 |     afterCreateHook.applyHook(templateName, {
31235 |       projectName,
31236 |       directoryPath: targetDirectoryPath
31237 |     });
31238 |   } catch (e) {
31239 |     throw new Error(
                  ^
error: Error running hook for cloudflare-workers: No such file or directory
      at C:\Users\ME\AppData\Local\Temp\bunx-791187370-create-hono@latest\node_modules\create-hono\bin:31239:11
⠙ Installing project dependencies
Bun v1.1.32 (Windows x64)

Additional information

When cd hono-tutorial, there was only the src folder, which contains nothing inside.
Also, if i choose bun as template, i get this error:

create-hono version 0.14.2
? Target directory my-app
? Which template do you want to use? bun
? Do you want to install project dependencies? yes
? Which package manager do you want to use? bun
✔ Cloning the template
× Failed to install project dependencies
@ryuapp
Copy link
Contributor

ryuapp commented Oct 23, 2024

If you don't have Node.js installed, this issue is the same as honojs/create-hono#51.
This is a bug in Bun. Node.js is currently required when running create-hono with Bun on Windows.
Ref: oven-sh/bun#12150

@Nanome203
Copy link
Author

If you don't have Node.js installed, this issue is the same as honojs/create-hono#51. This is a bug in Bun. Node.js is currently required when running create-hono with Bun on Windows. Ref: oven-sh/bun#12150

Hi @ryuapp
I just installed Node.js, and now it works like a charm. Thanks for your reply

@yusukebe
Copy link
Member

@ryuapp Thanks for the response.

@Nanome203 I'll close this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants