Greetings,
I have been able to import some simple external js libs like moment to stencil web components without any problems, but recently I wanted to build a stomp web component which depended on stomp-websocket and sockjs-client.
I couldn’t import neither of them properly. At any variation of import I use I get lots of warnings on the console of the npm start, and on browser console I get
TypeError: Cannot read property 'map' of null at my-component.js:13771 "http://localhost:3333/build/mycomponent/my-component.js"
@mycomponent.core.js:2193
npm start console:
[52:27.1] generate styles finished in 974 ms
preferring built-in module 'punycode' over local alternative at '(...)/my-component/node_modules/punycode/punycode.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'punycode' over local alternative at '(...)/my-component/node_modules/punycode/punycode.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'string_decoder' over local alternative at (...)/my-component/node_modules/string_decoder/lib/string_decoder.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
preferring built-in module 'string_decoder' over local alternative at '(...)/my-component/node_modules/string_decoder/lib/string_decoder.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
[52:29.9] module map finished in 3.84 s
Any insights on what is going on are appreciated.
Thank You.