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

Occasional error in morphdom-esm when saving changes #21

Closed
andy-bond opened this issue Apr 11, 2022 · 7 comments
Closed

Occasional error in morphdom-esm when saving changes #21

andy-bond opened this issue Apr 11, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@andy-bond
Copy link

Describe the bug
I'm having trouble reproducing this, but this does occur fairly consistently in a project I'm working on when serving eleventy.

Essentially, I make some changes to a file and the elevent-dev-server tries to reload. It sometimes encounters the error below. If I save the file again, it will continue working normally.

I am running this via an Nx monorepo using the @nrwl/workspace:run-commands, so not sure if that affects anything. The equivalent command using npm-run-all would be the command here.

[11ty] Unhandled rejection in promise: (more in DEBUG output)
[11ty] ENOENT: no such file or directory, open '/Users/bondandy/Projects/cx-cloud-ui/node_modules/@11ty/eleventy-dev-server/node_modules/morphdom/dist/morphdom-esm.js' (via Error)
[11ty] 
[11ty] Original error stack trace: Error: ENOENT: no such file or directory, open '/Users/bondandy/Projects/cx-cloud-ui/node_modules/@11ty/eleventy-dev-server/node_modules/morphdom/dist/morphdom-esm.js'
[11ty]     at Object.openSync (node:fs:585:3)
[11ty]     at Object.readFileSync (node:fs:453:35)
[11ty]     at EleventyDevServer._getFileContents (/Users/bondandy/Projects/cx-cloud-ui/node_modules/@11ty/eleventy-dev-server/server.js:184:23)
[11ty]     at EleventyDevServer.requestMiddleware (/Users/bondandy/Projects/cx-cloud-ui/node_modules/@11ty/eleventy-dev-server/server.js:275:29)
[11ty]     at EleventyDevServer.onRequestHandler (/Users/bondandy/Projects/cx-cloud-ui/node_modules/@11ty/eleventy-dev-server/server.js:347:11)
[11ty]     at Server.emit (node:events:390:28)
[11ty]     at parserOnIncoming (node:_http_server:951:12)
[11ty]     at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)

To Reproduce
Steps to reproduce the behavior:

  1. Save changes
  2. Error occurs
  3. Save same page again
  4. Works normal

Expected behavior
Ideally no error occurs and the changes are saved & page reloads

Environment:

  • OS and Version: MacOS 12.3.1
  • Eleventy Version: 2.0.0-canary.4

Additional context
Add any other context about the problem here.

@zachleat zachleat transferred this issue from 11ty/eleventy Apr 11, 2022
@zachleat
Copy link
Member

Until this gets some triage, just want to note that you can disable morphdom specifically with domdiff: false https://www.11ty.dev/docs/watch-serve/#eleventy-dev-server

@andy-bond
Copy link
Author

That is super helpful - thanks @zachleat!

This is a great workaround for now! Sorry for not putting this in the right repo - I always assume things bundled with 11ty are in the main 11ty repo.

@zachleat
Copy link
Member

(no worries at all!)

@zachleat
Copy link
Member

I did make a slight modification to this code in 1.0.0-canary.8 of dev server, please retest after that release!

@zachleat zachleat added bug Something isn't working and removed needs-triage labels Apr 13, 2022
@zachleat
Copy link
Member

1.0.0-canary.8 (and dare I say canary 9) are out

@zachleat zachleat added the waiting to close Issue that is probably resolved, waiting on OP confirmation. label Apr 15, 2022
@andy-bond
Copy link
Author

andy-bond commented Apr 16, 2022

Thanks @zachleat - I updated to 2.0.0-canary.5 and cannot get this to occur any longer.

BTW - is there anywhere that lists what changes between canary/beta builds? I like to use the latest & greatest but its hard to tell what I am gaining by switching canary version unless I see a Tweet or you comment on a bug fix. Not really a complaint, just curious if a changelog existed that tracked this kind of thing :)

@zachleat
Copy link
Member

@andy-bond the best way is to look at the Milestone (newest stuff is on top) https://github.com/11ty/eleventy/milestone/38?closed=1

Thanks!

@zachleat zachleat removed the waiting to close Issue that is probably resolved, waiting on OP confirmation. label May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants