adminjs-upload icon indicating copy to clipboard operation
adminjs-upload copied to clipboard

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

Open ihorpron opened this issue 2 years ago • 1 comments

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.

ihorpron avatar Sep 29 '23 12:09 ihorpron

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.

dziraf avatar Oct 02 '23 07:10 dziraf