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

ESM loader cannot detect module system properly in folder whose name ends with node_modules #51245

Closed
AnnAngela opened this issue Dec 21, 2023 · 1 comment · Fixed by #51269
Closed
Labels
confirmed-bug Issues with confirmed bugs. loaders Issues and PRs related to ES module loaders

Comments

@AnnAngela
Copy link

Version

v20.10.0

Platform

Linux 4.4.0-19041-Microsoft #3636-Microsoft Thu Oct 19 17:41:00 PST 2023 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

modules/esm

What steps will reproduce the bug?

The repo: https://github.com/AnnAngela/node-issue

The reproduce steps: https://github.com/AnnAngela/node-issue/blob/08407276c119b18f12f0deb1193d4815dc8d6956/.github/workflows/test.yaml#L21-L22

How often does it reproduce? Is there a required condition?

Always reproduce, with the workding folder whose name ends with node_modules

What is the expected behavior? Why is that the expected behavior?

Should not throw any error.

What do you see instead?

The workflow log: https://github.com/AnnAngela/node-issue/actions/runs/7285434922/job/19852334885#step:4:13

Additional information

I'm not sure if the working directory can only end with node_modules, or can start with node_modules or contain node_modules in the middle.

@targos
Copy link
Member

targos commented Dec 21, 2023

@nodejs/loaders

@targos targos added the loaders Issues and PRs related to ES module loaders label Dec 21, 2023
@marco-ippolito marco-ippolito added the confirmed-bug Issues with confirmed bugs. label Dec 21, 2023
targos added a commit to targos/node that referenced this issue Dec 23, 2023
nodejs-github-bot pushed a commit that referenced this issue Dec 25, 2023
Fixes: #51245
PR-URL: #51269
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
RafaelGSS pushed a commit that referenced this issue Jan 2, 2024
Fixes: #51245
PR-URL: #51269
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. loaders Issues and PRs related to ES module loaders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants