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

Entry file displayed as mod.ts, even though it is set to something else. #54

Closed
mjrlowe opened this issue Jul 26, 2020 · 5 comments
Closed

Comments

@mjrlowe
Copy link

mjrlowe commented Jul 26, 2020

This is the same issue that I previously described in nestdotland/nest.land#185, but that was fixed by @MartonDev in nestdotland/nest.land#184.
It seems that exactly the same problem is happening again (see here), despite the entry file still being set to something else (in this case mod.js) in egg.json.

@martonlederer
Copy link
Member

This is really strange. I'll check this asap.

@t8
Copy link
Member

t8 commented Jul 26, 2020

@thewizardbear thanks for making this issue. Would you mind trying the following steps for me and reporting back what happens?

  1. Make sure eggs -V returns the latest version (0.2.1)
  2. In your egg.json, change the entry field to: ./mod.js instead of just mod.js
  3. Change the name field to something other than your actual module name (for testing without pushing an official version to your real module)
  4. Change the unlisted field to true on this test (so it doesn't publish the module to the gallery)
  5. Publish the test module and see if the import link was fixed or not.

@mjrlowe
Copy link
Author

mjrlowe commented Jul 27, 2020

@t8 eggs -V shows that I am on version 0.2.1.
I have published an unlisted test package but it appears to have the same problem, even having replaced "mod.js" with "./mod.js" in egg.json.


I also made this minimal example which has the same issue. This was the egg.json file for it:

{
  "name": "entry-file-test-module-2",
  "description": "test (see https://github.com/nestdotland/nest.land/issues/241)",
  "unlisted": true,
  "stable": true,
  "files": [
    "./main.ts"
  ]
}

@t8
Copy link
Member

t8 commented Aug 2, 2020

Thanks for doing this. This is definitely a bug with our latest version. We'll work on a fix for this!

I took a look at your maze_generator module, and your egg.json file appears to be valid.

It appears that your second test example doesn't specify main.ts as the entry file, so that will still default to mod.ts since the field isn't set.

CC @oganexon

@SteelAlloy SteelAlloy transferred this issue from nestdotland/nest.land Aug 7, 2020
@SteelAlloy SteelAlloy changed the title [BUG] Entry file displayed as mod.ts, even though it is set to something else. Entry file displayed as mod.ts, even though it is set to something else. Aug 7, 2020
@SteelAlloy
Copy link
Member

Fixed in #55.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants