Fork me on GitHub
#shadow-cljs
<
2020-04-14
>
David Pham20:04:10

I wondered if anyone had this issue: I am using tfjs-backend-wasm and it requires a wasm file. When I developping, shadow-cljs does not transfer the *.wasm file from the node_module directory. Anyone knows how to circumvent this behavior? Maybe I am doing something wrong.

thheller20:04:17

shadow-cljs has no support for wasm at all. so totally expected that it doesn't copy wasm files.

David Pham22:04:00

Then do you think it would make sense to support the node modules that contains WASM files?

thheller07:04:16

once there is a settled standard for wasm maybe. right now each toolchain produces their own variant of JS glue code and includes it differently

thheller07:04:41

if they ever standardize it I will of course include support for it

thheller07:04:35

until then it would be too much work for me to keep up with all the different ways people handle this

Spaceman22:04:01

Hi, I'm running a shadow-cljs app, and getting the following error in my browser: WebSocket connection to '<ws://localhost:9631/ws/worker/app/d220add9-aa54-43e3-be71-b121ec13636f/e2fa1a2b-01cf-44e7-9bf0-c5db8cb75503/browser>' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED And the shadow-cljs has stopped reloading, and I don't know what's causing this. How do I even start to debug this, if there aren't any other errors in the console? (edited)  Well there's also this error: shadow-cljs: websocket error Event {isTrusted: true, type: "error", target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …} bubbles: false cancelBubble: false cancelable: false composed: false currentTarget: WebSocket {url: "<ws://localhost:9631/ws/worker/app/d220add9-aa54-43>…636f/e2fa1a2b-01cf-44e7-9bf0-c5db8cb75503/browser", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …} defaultPrevented: false eventPhase: 0 isTrusted: true path: [] returnValue: true srcElement: WebSocket {url: "<ws://localhost:9631/ws/worker/app/d220add9-aa54-43>…636f/e2fa1a2b-01cf-44e7-9bf0-c5db8cb75503/browser", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …} target: WebSocket {url: "<ws://localhost:9631/ws/worker/app/d220add9-aa54-43>…636f/e2fa1a2b-01cf-44e7-9bf0-c5db8cb75503/browser", readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …} timeStamp: 147976.1250000156 type: "error" proto__: Event

thheller07:04:50

net::ERR_CONNECTION_REFUSED means the browser failed to connect to localhost:9631

thheller07:04:10

that is not the standard port. so that means there was something else listening on 9630?

thheller07:04:44

could also be your firewall blocking access or your OS having other issues causing it to fail

David Pham08:04:47

Or maybe two shadow-CLJS processes?

thheller08:04:55

yeah could just be 2 different shadow-cljs processes interfering with each other

lilactown22:04:28

@pshar10 is your watch running?

Spaceman22:04:17

yes the watch is running.

David Pham22:04:16

Do you have a copy of your build file?

Pavel Klavík23:04:40

Hi, when I build my project in watch mode, everything works fine. But when I build it in release, the compilation works and I get the following error on the start:

shared.js:180 shadow-cljs - failed to load 7
LB @ shared.js:180
shadow$provide.<computed> @ main.js:18
LB @ shared.js:180
$APP.Ho @ shared.js:180
(anonymous) @ main.js:3198
(anonymous) @ main.js:4036
shared.js:180 shadow-cljs - failed to load 11
LB @ shared.js:180
$APP.Ho @ shared.js:180
(anonymous) @ main.js:3198
(anonymous) @ main.js:4036
shared.js:180 Uncaught TypeError: $jscomp.initSymbol is not a function
    at Object.shadow$provide.<computed> (main.js:9)
    at LB (shared.js:180)
    at Object.shadow$provide.<computed> (main.js:18)
    at LB (shared.js:180)
    at Object.$APP.Ho (shared.js:180)
    at main.js:3198
    at main.js:4036
Any idea what could be causing this??

Pavel Klavík23:04:32

We have added some npm dependencies, so this could be causing this?

Pavel Klavík23:04:06

Problem persists when I upgraded to Shadow-cljs 2.8.95.