bsansouci / reprocessing-example

79 stars 27 forks source link

indexhot.byte not working in Windows 10 #12

Closed mjoerussell closed 6 years ago

mjoerussell commented 6 years ago

I've been trying to start working with Reprocessing but haven't been able to successfully run the starting project. I can build to web and native, but trying to hot reload on web is causing issues. When I run yarn start I get the following error:

Fatal error: exception Unix.Unix_error(21, "create_process", "node_modules\\.bin\\bsb")
error Command failed with exit code 2.

Trying to run npm start results in a longer log file I can post if necessary.

It seems like if I run python -m SimpleHTTPServer for web or yarn start:native I can still see the default output (blue square), but nothing I change seems to update it after restarting. I have a feeling that part might be user error, but I'm not sure. Besides start installing the dependencies and building the project seemed to go smoothly.

bsansouci commented 6 years ago

Hey! I think I know what it is... On Windows, the file to run bsb-native isn't called bsb it's called something like bsb.cmd. Could you run dir node_modules\.bin to see what the file's actually called?

Then to test this, can you modify this line in node_modules/reprocessing/src/bytecode/Reprocessing_Hotreload_Bytecode.re to end with whatever the file name you see is. Then you should maybe add -clean-world to the build nom script in the package.json.

mjoerussell commented 6 years ago

bsb and bsb.cmd both exist in node_modules\.bin. I don't think this is exactly what you were asking for but I changed this line to

let bsb = "node_modules" +/ ".bin" +/ "bsb.cmd";

Then I ran bsb -clean-world and then rebuilt on web and native. Hot reloading is now working perfectly on native but not when I run a local server. This is a great start though! I'm happy I can start working.

mjoerussell commented 6 years ago

Oh, and running yarn start now brings up the native window automatically where it didn't before. Don't know if this is an issue or not but it doesn't seem to be a problem.

bsansouci commented 6 years ago

Awesome. Thanks for trying.

I fixed in reprocessing master but still need to publish it.