[ERROR] Nativescript

I'm creating a nativescript mobile app and I can't import Colyseus to my project. I installed Colyseus using npm (npm install --save colyseus.js) then, when I import Colyseus (import Client from 'colyseus.js'), the app build (tns run android) crashes.
Here are the errors

alt text

Any suggestions?

I got the same error! As I understand it, the problem is that webpack settings do not know how to work with mjs files. I work with nativescript-vue. I found a solution for compiling mjs files for vue, but I don't know how to integrate it into the project:
// vue.config.js
module.exports = {
chainWebpack: config => config.resolve.extensions.prepend('.mjs').prepend('.wasm')