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

deno publish failed with error: error[excluded-module] when export casing differs from file casing #24635

Open
UrielCh opened this issue Jul 18, 2024 · 5 comments
Labels
bug Something isn't working correctly publish Related to "deno publish" subcommand

Comments

@UrielCh
Copy link

UrielCh commented Jul 18, 2024

Version: Deno 1.45.2

I have 37 generated project to publish, so they have all the same shape.

some of them failed with error :

Checking for slow types in the public API...
error[excluded-module]: module in package's module graph was excluded from publishing
 --> /dev/react-icons-gi/ico/Gi3dGlasses.ts
  = hint: remove the module from 'exclude' and/or 'publish.exclude' in the config file or use 'publish.exclude' with a negative glob to unexclude from gitignore

  info: excluded modules referenced via a package export will error at runtime due to not existing in the package
  docs: https://jsr.io/go/excluded-module

error[excluded-module]: module in package's module graph was excluded from publishing
 --> /dev/react-icons-gi/ico/Gi3dHammer.ts
  = hint: remove the module from 'exclude' and/or 'publish.exclude' in the config file or use 'publish.exclude' with a negative glob to unexclude from gitignore

  info: excluded modules referenced via a package export will error at runtime due to not existing in the package
  docs: https://jsr.io/go/excluded-module

The error message is not relevant, I had only exclude my .github folder, and the error is the same without any exclude.

error sample:
https://github.com/UrielCh/react-icons-gi/actions/runs/9988509932/job/27605141756

similar project without the error:
https://github.com/UrielCh/react-icons-ai/actions/runs/9988506667/job/27605128093

all those project will be published here

@UrielCh
Copy link
Author

UrielCh commented Jul 18, 2024

Note this project have 4038 exports.

removing the export:

    "./Gi3dGlasses": "./ico/Gi3dGlasses.ts",
    "./Gi3dHammer": "./ico/Gi3dHammer.ts",
    "./Gi3dMeeple": "./ico/Gi3dMeeple.ts",
    "./Gi3dStairs": "./ico/Gi3dStairs.ts",
    "./GiBottomRight3dArrow": "./ico/GiBottomRight3dArrow.ts",

make the publish works.
see commit: UrielCh/react-icons-gi@5eb8efe

but those export should be valide.

@dsherret dsherret added bug Something isn't working correctly publish Related to "deno publish" subcommand labels Jul 18, 2024
@dsherret dsherret self-assigned this Jul 18, 2024
@dsherret dsherret changed the title deno publish failed with error: error[excluded-module] deno publish failed with error: error[excluded-module] when export casing differs from file casing Jul 18, 2024
@dsherret
Copy link
Member

dsherret commented Jul 18, 2024

The problem here is the export value is "./ico/Gi3dGlasses.ts", but the file itself is cased as Gi3DGlasses.ts. Update the export value to be the same as the file and it should work. We'll have to add a better diagnostic here for this situation because it won't work when published.

@dsherret dsherret removed their assignment Jul 18, 2024
@UrielCh
Copy link
Author

UrielCh commented Jul 18, 2024

Oups, thx for the 👁️

I'm not shure it worth implementing a warrnig for such a case, for now.

by the way one of my publish failed badly:
https://jsr.io/status/cc29f358-14fa-4bfe-9150-0df3f7374e37

V 1.0.12 can not be yank nor deleted.

@UrielCh
Copy link
Author

UrielCh commented Jul 18, 2024

Screenshot 2024-07-18 at 21 23 47

Screenshot 2024-07-18 at 21 24 27

4k vs 4K ... arf

@UrielCh UrielCh closed this as completed Jul 18, 2024
@dsherret
Copy link
Member

Deno should give a descriptive error about what's going on to help people out, so I'd rather keep this open.

@dsherret dsherret reopened this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly publish Related to "deno publish" subcommand
Projects
None yet
Development

No branches or pull requests

2 participants