Closed brookemitchell closed 6 years ago
Hi! I think I had this same problem. This might be happening because the socket io is being asked to connect before the io is attached on the window.
It helped me to move the following line to the end of the views/layout.jade
file:
script(data-main="scripts/app." + jsApp, type="text/javascript", src="scripts/vendor/require-jquery.js")
This is so that the scripts loading definitely should happen after the socket io script runs in the head. You can see this here: https://github.com/pandafulmanda/noduino/blob/2707b6420869d95d1fba07dfec88c84f72243569/views/layout.jade .
I hope that helps!
if that's the case ( your script needs to wait ) you can add a very ugly attribute to the script tag defer=true
and keep it on the head and it will be loaded after the ones without the defer property. ugly but works, better avoid it!
Once the example web server is running, when I click on 'Connect to Arduino' I get this error. Unfortunately my debug skills aren't quite there yet. Any help?