mailing: Hot reload error Ubuntu

Hi, when I start the preview server on Ubuntu 22.04 (node 14 and node 16) I get this error:

error starting change watcher TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js

As a consequence the hot reload is not working and I must start and stop the preview server to reload changes.

Can you please help me?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 22 (7 by maintainers)

Commits related to this issue

Most upvoted comments

hell yes. thanks for testing! 🤝

Yes, it works! Thank you for the support!

Whoops, didn’t mean to close but did merge some fixes in that made it work for me on ubuntu. In particular… watch fix: #155 bundling fix: #154

@ludovicoserrani-nautes can you let me know if this is fixed for you in the latest release 0.7.3?

Thanks!

Weird… the second time I booted mailing, I did not encounter this problem. I think there is potentially a race condition with copying files around here where we copy emails from userspace to .mailing. Will dig around more tomorrow.

I made a branch (https://github.com/ludovicoserrani-nautes/mailing-esbuild-node/tree/mailing-0.7.2-next.1) with the upgraded package.

To start the preview server I used the command npx mailing@0.7.2-next.1.

chokidar seems to work, in fact the project recompiles when I save an edited file, but then I got a compilation error.

The full log is:

mailing starting preview server
event - compiled client and server successfully in 641 ms (183 modules)
wait  - compiling...
event - compiled client and server successfully in 152 ms (183 modules)
mailing watching for changes to emails
mailing running preview at http://localhost:3883/
wait  - compiling / (client and server)...
event - compiled client and server successfully in 692 ms (267 modules)
mailing 200 / 947ms
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 365 ms (268 modules)
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/basic-features/fast-refresh#how-it-works
wait  - compiling /api/previews...
wait  - compiling /previews/[previewClass]/[previewFunction] (client and server)...
event - compiled client and server successfully in 472 ms (310 modules)
event - compiled client and server successfully (321 modules)
mailing 200 /api/previews 1200ms
warn  - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/basic-features/fast-refresh#how-it-works
mailing 200 /previews/Welcome/toAmelita 1165ms
mailing 200 /previews/Welcome/toAmelita 1144ms
mailing 308 /api//previews/Welcome/toAmelita 2ms
wait  - compiling /api/previews/[moduleName]/[functionName]...
mailing 200 /icon-desktop.svg 38ms
mailing 200 /icon-mobile.svg 34ms
mailing 200 /icon-question.svg 37ms
mailing 200 /icon-send.svg 34ms
mailing 200 /icon-code.svg 50ms
event - compiled successfully in 204 ms (141 modules)
mailing 200 /api/previews/Welcome/toAmelita 307ms
mailing detected change on emails/Welcome.jsx, reloading
wait  - compiling...
error - ./src/emails/Welcome.jsx:14:0
Module not found: Can't resolve './components/BulletedList'
  12 |   MjmlSpacer,
  13 | } from "mjml-react";
> 14 | import BulletedList from "./components/BulletedList";
  15 | import ButtonPrimary from "./components/ButtonPrimary";
  16 | import {
  17 |   leadingTight,

Import trace for requested module:
./src/emails/previews/Welcome.jsx
./src/moduleManifest.ts
./src/util/moduleManifestUtil.ts
./src/pages/index.tsx

https://nextjs.org/docs/messages/module-not-found
wait  - compiling...
error - ./src/emails/Welcome.jsx:14:0
Module not found: Can't resolve './components/BulletedList'
  12 |   MjmlSpacer,
  13 | } from "mjml-react";
> 14 | import BulletedList from "./components/BulletedList";
  15 | import ButtonPrimary from "./components/ButtonPrimary";
  16 | import {
  17 |   leadingTight,

Import trace for requested module:
./src/emails/previews/Welcome.jsx
./src/moduleManifest.ts
./src/util/moduleManifestUtil.ts
./src/pages/index.tsx

https://nextjs.org/docs/messages/module-not-found
mailing 308 /api//previews/Welcome/toAmelita 2ms
mailing 200 /api/previews/Welcome/toAmelita 75ms

Don’t know if this can be related to the original issue or it’s something else.

Sure! I can try that as soon as the test release is available. Thank you!

@psugihara this is starting to look more like the issues I see in #129, so I’m exciting by this thing breaking 😀