PacktPublishing / Full-Stack-Web-Development-with-Remix

Full Stack Web Development with Remix, published by Packt
MIT License
127 stars 24 forks source link

BeeRich remix.init script fails #125

Closed andrelandgraf closed 2 months ago

andrelandgraf commented 10 months ago

Describe the bug

BeeRich's remix.init script fails due to an ESM error.

Actual behavior

create-remix fails to execute the init script:

  init   This template has a remix.init script. Do you want to run it?
         Yes

      ✔  Dependencies installed

      ✔  Git initialized

      ◼  Running template's remix.init script... 

      ▲  Oh no! Template's remix.init script failed

Expected behavior

Hey there! Great job practicing using a custom stack! You're doing great! should be logged to the console when running:

andrelandgraf commented 10 months ago

Reported the issue to the Remix team: https://github.com/remix-run/remix/issues/7951.

andrelandgraf commented 7 months ago

Hopefully fixed via https://github.com/remix-run/remix/pull/8100

riiiiion commented 2 months ago

I had a similar problem myself.

If I add a package.json to the remix.init folder with the following description I was able to run npx remix init without any problems.

{
  "type": "commonjs"
}
andrelandgraf commented 2 months ago

Thanks! I was hoping create-remix could fix this internally. Is this still happening on v2.10? I guess adding the package.json is a good enough fix for this repo. Will make an update this weekend. 🙏

andrelandgraf commented 2 months ago

Thanks for reminding me to fix this, @riiiiion. 😅