shellscape/jsx-email

Error:ENOTDIR on any changes.

Closed this issue · 5 comments

  • Component or Package Name: jsx-email
  • Component or Package Version: "^2.0.0"
  • @jsxp-email/cli Version?: not installed
  • Operating System (or Browser): MacOS, M2, Arc/Brave/Chrome
  • Node Version: 20.18.0
  • Link to reproduction (⚠️ read below): https://github.com/ArifAA14/Repro

Expected Behavior -

Actual Behavior - So everything works, I run 'npm run dev' and it opens up, but every change I make in the /templates directory stops the server and following error is produced in terminal

Changes such as - as soon as any changes in templates/email.tsx such as color, text and etc are saved the server stops running and following error appears

Error: ENOTDIR: not a directory, stat '/Users/studio/Desktop/test/email-project/node_modules/react/cjs/react.production.min.js/**/*.{jsx,tsx}'

Thanks for the issue and reproduction. I'm currently waiting for power to be restored after hurricane Milton hit Florida, so I'll look into this as soon as I can.

Thanks for the issue and reproduction. I'm currently waiting for power to be restored after hurricane Milton hit Florida, so I'll look into this as soon as I can.

Oh no, stay safe and take your time, this can surely wait!

I was able to reproduce the error. I'll start investigating, thank you

This was an oversight on my part. ESBuild has different behaviors and presents build data differently based on the number of files in a build. I need to adjust the logic for determining a template's dependencies.

I have a fix for this, but it needs some more testing. Should have this ready for a patch release tomorrow.