choojs / bankai

:station: - friendly web compiler
Apache License 2.0
1.09k stars 102 forks source link

Bankai + Electron falling over because no service worker #233

Open sholtomaud opened 6 years ago

sholtomaud commented 6 years ago

Error: ENOENT: no such file or directory, open '.../sw.js

Bankai seems to be expecting a service worker in an Electron app. But Electron doesn't need one as it has a runtime nodejs.

sholtomaud commented 6 years ago

perhaps a cli option >--sw [true/fase] or just --sw would be the go?

yoshuawuyts commented 6 years ago

Thanks for reporting this! Bankai should never expect a service worker, if it finds one it should act upon it - but it should also be cool if there is none. Are you running on the new-new-new branch? If you aren't, could you give that a shot? Thanks!

On Mon, Sep 11, 2017 at 10:45 AM Sholto Maud notifications@github.com wrote:

perhaps a cli option >--sw [true/fase] or just --sw would be the go?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/choojs/bankai/issues/233#issuecomment-328461624, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlekgN0Ts4ZlT55FykDf6gexXu2TjMks5shPMfgaJpZM4PS0y3 .

sholtomaud commented 6 years ago

Ok. That was an interesting exercise.

I like the new server, however i'm not sure what the manifest and sw are doing in the information screen for an electron app.

image

Also bankai#new-new-new seems to be using the new http2 switch, which I haven't set up for an electron app, and the response is: ERR_INSECURE_RESPONSE. I'm tired now might come back to it in the morning.

Sorry, I failed to test this issue.

sholtomaud commented 6 years ago

image

sholtomaud commented 6 years ago

@yoshuawuyts How do I run an electron bankai choo-app so I don't get the ERR_INSECURE_RESPONSE error?

sholtomaud commented 6 years ago

... does the new-new-new log screen reflect the folder structure? What is the documents item referrin to?

yoshuawuyts commented 6 years ago

Oh no, the insecure response thing is bad! cc/ @bcomnes how're you building hyperamp? Any suggestions how we could improve here?

On Tue, Sep 12, 2017 at 10:49 AM Sholto Maud notifications@github.com wrote:

... does the new-new-new log screen reflect the folder structure? What is the documents item referrin to?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/choojs/bankai/issues/233#issuecomment-328786767, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWlemF3yHWU86_2bdD3LUIvtUspGKbjks5shkWjgaJpZM4PS0y3 .

bcomnes commented 6 years ago

We use the weird frankenvironment of chrome and node in electron browser windows and require modules directly. 0 build step, thats why I push for everything working at runtime just as well as post build steps 😜