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

fix:err_package_path_not_exported error in typescript #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Josias1997
Copy link

admin express errror

I fixed the error by adding "require" field to the "exports" field in package.json.

@dziraf
Copy link
Contributor

dziraf commented Apr 22, 2024

AdminJS packages are ESM-only. Require exports are omitted on purpose

@Josias1997
Copy link
Author

AdminJS packages are ESM-only. Require exports are omitted on purpose

Without that I can't get it to work in my typescript project. I tried all kind of configurations in tsconfig without success. That was the thing that finally did it for me.

@dziraf
Copy link
Contributor

dziraf commented Apr 22, 2024

set module to nodenext and remove moduleResolution, your project must be esm compatible though

@Josias1997
Copy link
Author

Still won't work. I had to switch to bun.js. It's working without issues now.

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

Successfully merging this pull request may close these issues.

3 participants