-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
--experimental-resolve-self and exports sugar #30602
Comments
@guybedford, wouldn't that reference form a circularity? I believe the
Also, the second flag it lists has a really big typo. |
@guybedford, I was not able to reproduce this bug. Please see DerekNonGeneric/node-30602 and reconfirm. I should note that if the |
You need a require(‘test’) in the file as described. A circular reference
is used to make the test a single file.
…On Tue, Nov 26, 2019 at 08:51 Derek Lewis ***@***.***> wrote:
@guybedford <https://github.com/guybedford>, I was not able to reproduce
this bug. Please see DerekNonGeneric/node-30602
<https://github.com/DerekNonGeneric/node-30602> and reconfirm. I should
note that if the index.js file were removed, it wouldn't work. Probably
because then the package wouldn't have a main module.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30602?email_source=notifications&email_token=AAESFSUI6NSSAI2GZNWVQZ3QVUSULA5CNFSM4JQVN5CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFGCBEQ#issuecomment-558637202>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAESFSSBJQLCQHOGBBYZN3LQVUSULANCNFSM4JQVN5CA>
.
|
https://github.com/DerekNonGeneric/node-30602/blob/master/test.js#L1 Still no error.
Your command is for |
@DerekNonGeneric you need to remove the |
😅 I mentioned that it needed an Anyways, after removing
This coincides with the "MODULE_NOT_FOUND" error described in #30633. Removing the
All that's left to do is double-check that this is working according to how the spec is written. If I find a discrepancy, I'll bring it up in the other issue that mentions this. |
The bug, that this issue is tracking, is that exports to a string should be the main for both CJS and ESM. |
Fixed in #31009. |
Currently when using the
--experimental-resolve-self
flag, with the following:If including a
require('test')
in thetest.js
file and runningnode --experimental-resolve-self pkg/test.js
this will throw an error.It works with "main" and exports subpaths though so may be a sugar-specific or main-specific error case for this flag.
The text was updated successfully, but these errors were encountered: