Files app showing the import error while importing npm modules in js folder

In the files app trying to import the node modules in the file “file-upload.js”. which gives the error “Cannot use import statement outside a module”…although node_modules folder and package.json folder are inside the files app.i have also tried adding type=“module”…it did not solve the issue.
version:
nc18
PHP 7.2.24-0
ubuntu0.18.04.4

Have you find a solution ?