-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Eleventy doesn't correctly resolve ESM (custom server) #3178
Comments
Can you provide an minimum test case of your server module? |
Please take a look at https://github.com/VividVisions/11ty-test-3178.
More infos in the README. Please let me know if you need anything. |
Milestoning to 3.0 |
Maybe related to #3200 |
I've updated my test case to use alpha.6 (and also fixed the config): https://github.com/VividVisions/11ty-test-3178
|
Excellent test case—thank you very much. This will ship fixed in 3.0.0-alpha.7 (or you can test via GitHub’s |
I can confirm that this issue has been fixed in 3.0.0-alpha.7. Thank you for your tireless commitment! |
Hey @zachleat, it seems that starting from Node.js 18.19.1+ and 11ty 3.0-alpha-8+ this issue appeared again |
Hi @what1s1ove! I've updated my test case to use 3.0-alpha-10 and tested with Node.js 18.19.1 and 21.5.0 and got no errors. |
Hey @VividVisions ! Here are the logs: As you can see, firstly I started the app with node v18.19.0 (npm v10.2.3) and there are no any errors. But once I switched node to v18.19.1 (npm v10.2.4) or any higher version I got this error:
UPD: I just updated the npm to the latest version (v10.8.1) and the error has disappeared on 18.xx and 20.xx versions of the node. Thank you for this question 😁 It forced me to think deeper 👍 |
Operating system
macOS Ventura 13.6.3
Eleventy
3.0.0-alpha.4
Describe the bug
When I set my custom Eleventy server (written as ESM and linked via
npm ln
) like this:I get this error (I redacted my local paths):
But if I use the proposed (and correct) path, I get this error:
because Eleventy tries to open
[…]/node_modules/my-custom-server/lib/server.js/package.json
.Reproduction steps
See description.
Expected behavior
Eleventy should correctly resolve ES modules.
Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: