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

Resolves wrong node_modules path on Workspaces #1410

Open
canataly-backupta opened this issue Dec 23, 2024 · 0 comments
Open

Resolves wrong node_modules path on Workspaces #1410

canataly-backupta opened this issue Dec 23, 2024 · 0 comments

Comments

@canataly-backupta
Copy link

canataly-backupta commented Dec 23, 2024

  • Maizzle Version: 5.0.0
  • Node.js Version: 23.3.0

I am upgrading to v5 and had problem with HMR on Workspaces. I am using NX and my Maizzle project is a application without package.json.

I am starting my project with (cd apps/email && maizzle serve) command which works fine until I preview an email template. In that case first draw is successful but I get following error on console.

node:internal/fs/promises:639
  return new FileHandle(await PromisePrototypeThen(
                        ^

Error: ENOENT: no such file or directory, open '.../apps/email/node_modules/morphdom/dist/morphdom-umd.js'
    at async open (node:internal/fs/promises:639:25)
    at async Object.readFile (node:internal/fs/promises:1239:14)
    at async file:///.../node_modules/@maizzle/framework/src/server/routes/hmr.js:11:26 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/.../apps/email/node_modules/morphdom/dist/morphdom-umd.js'
}

I think it tries to resolve from maizzle root instead of call root.

Since there is no option select a different root calling it like this is only option at the moment.

It works if I manually copy node_modules/morphdom but it is hacky.

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

No branches or pull requests

1 participant