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

How I can realize file upload with 4.0.1? Should I use for this dynamic imports? #70

Open
ihorpron opened this issue Sep 29, 2023 · 1 comment

Comments

@ihorpron
Copy link

Got error when tried to import @adminjs/upload: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@adminjs/upload")' call instead.

@dziraf
Copy link
Contributor

dziraf commented Oct 2, 2023

The latest versions of AdminJS packages can only be used in ESM projects. If your project is CommonJS, you'd have to downgrade to AdminJS v6 and use it's compatible dependencies.

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

2 participants