Steal errors with development.html

I am trying to run development.html on my local file system (since ultimately I need the app to run without the server) and I get the following errors (using node 0.12, npm 2.14, donejs 0.5):

XMLHttpRequest cannot load file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/npm.js. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.fetchTextFromURL @ steal.js:2626(anonymous function) @ steal.js:2801init @ steal.js:377Promise @ steal.js:365$__Object$defineProperty.value @ steal.js:2800loader.fetch @ steal.js:3615loader.fetch @ steal.js:4638loader.fetch @ steal.js:4738(anonymous function) @ steal.js:1525tryCatchReject @ steal.js:1183runContinuation1 @ steal.js:1142Fulfilled.when @ steal.js:930ContinuationTask.run @ steal.js:1040Scheduler._drain @ steal.js:97Scheduler.drain @ steal.js:62run @ steal.js:268
steal.js:5894 steal - error loading @config. Error loading "package.json!npm" at <unknown>

Error loading "npm" at file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/npm.js
: file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/npm.js
steal.js:2626 

XMLHttpRequest cannot load file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/dev.js. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.fetchTextFromURL @ steal.js:2626(anonymous function) @ steal.js:2801init @ steal.js:377Promise @ steal.js:365$__Object$defineProperty.value @ steal.js:2800loader.fetch @ steal.js:3615loader.fetch @ steal.js:4638loader.fetch @ steal.js:4738(anonymous function) @ steal.js:1525tryCatchReject @ steal.js:1183runContinuation1 @ steal.js:1142Fulfilled.when @ steal.js:930ContinuationTask.run @ steal.js:1040Scheduler._drain @ steal.js:97Scheduler.drain @ steal.js:62run @ steal.js:268
steal.js:6060 error 

Error loading "@dev" at file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/dev.js
: file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/dev.js undefined
steal.js:140 

Potentially unhandled rejection [9] Error loading "@dev" at file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/dev.js
: file:///home/dovid/mm_workspace/MenuboardManager-dev/menuboard-manager/sssp/menuboard-manager/node_modules/steal/ext/dev.js (WARNING: non-Error used)

You’re not going to be able to open development.html from the filesystem in a normal browser. Cordova/NW use the file protocol but allow cross-origin requests, normal browsers do not.

what cross-origin requests are being made? Isn’t everything running locally, from the same origin (i.e. the filesystem)?

will production.html work?

Steal makes ajax requests to load your modules. Browsers do not allow ajax requests to the file system.

If you only use AMD syntax (no es6 or CommonJS) there is a plugin that will use script tags instead of ajax requests. If you use that you should be able to run off the filesystem. I’ll look for that plugin.

Good News, steal runs on the monitor even though it’s using the file:// protocol. And I got it to display my test app. :grinning:

I found the chrome flag that Justin mentioned, it’s --disable-web-security, and I found a chrome extension that will do the same thing called “Allow-Control-Allow-Origin.” However I couldn’t get either to work for me (yet). So worst case I’ll do local debugging in with the donejs develop server or in firefox.