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

Package can't be imported for programmatic use #680

Open
adi518 opened this issue Sep 14, 2024 · 0 comments
Open

Package can't be imported for programmatic use #680

adi518 opened this issue Sep 14, 2024 · 0 comments
Labels

Comments

@adi518
Copy link

adi518 commented Sep 14, 2024

Describe the bug
We can't import Barrelsby from the package to be used programmatically because the main entry in package.json is set incorrectly. It should be ./bin/index.js. For the time being, I used patch-package to fix it locally.

Note that when using it programmatically, you must pass both the delete and noHeader flags set to true. Otherwise, it reproduces #153.

To Reproduce
Steps to reproduce the behavior:

  1. Try to import Barrelsby
  2. See the error

Expected behavior
To be able to import the package

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Node Version [e.g. 14, 16]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@adi518 adi518 added the bug label Sep 14, 2024
@adi518 adi518 changed the title Package.json main entry is incorrect Package can't be imported for programmatic use Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant