# there are a lot of possible solutions for this problem
1) change es6 to es5 import
import package from 'packageName'; ->
var package = require('packageName');
2) change file extension (.js -> .mjs)
3) add "type: module" in package.json
4) add 'type="module"' in script tag