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

BeeRich remix.init script fails

Closed this issue · 5 comments

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:

  • npx create-remix@2 --template <bee-rich GitHub URL> to bootstrap the application
  • npx remix init in the root of the BeeRich project after bootstrapping the application

Reported the issue to the Remix team: remix-run/remix#7951.

Hopefully fixed via remix-run/remix#8100

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"
}

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. 🙏

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