StealJS build watch, fails to rebuild most of the time

When I run node build on this it works the first time. Then when I modify some code that is being built. Build watch fails most of the time to build properly and I get errors.

It works usually the first 2 times.

var stealTools = require("steal-tools");

stealTools.build( {
    config: __dirname + "/package.json!npm",
}, {
    sourceMaps: true,
    bundleSteal: true,
    minify: false,
    watch: true
} );

Most of the time I get this error in the browser.

Failed to load resource: the server responded with a status of 404 (Not Found)
main.js?version=f82b611…:6370Error loading "package.json!npm" at <unknown>
Error loading "npm" at http://dev.drivetrain.com/npm.js
Not Found: http://dev.drivetrain.com/npm.js undefined

The code that throws this error, in my main.js that gets built in the /dist/ folder, that I am including.

var oldSteal = global.steal;
		global.steal = makeSteal(System);
		global.steal.startup(oldSteal && typeof oldSteal == 'object' && oldSteal)
			.then(null, function(error){
				if(typeof console !== "undefined") {
					// Hide from uglify
					var c = console;
					var type = c.error ? "error" : "log";
					c[type](error, error.stack);
				}
			});
		global.steal.clone = cloneSteal;
		global.steal.addSteal = addSteal;

Terminal throws this in yellow.
WARNING: Can't find dependency package.json!npm in graph.

Sometimes I get an error that says something along the lines of System is not defined, I couldn’t recreate it this time, but it happens quite often.

This is not caused by a syntax error in the code that I am editing, this happens even if I edit the text of a comment, or even a .stache template.

Thanks!

Hey @Nothing_New, I don’t think you’re doing anything wrong here. It seems like it’s probably a bug. I would suggest posting an issue on steal-tools about this.

Thanks for the reply. StealJs does not have it’s own forum, this looks like the forum for StealJs.

Thanks!

Hey @Nothing_New, here’s the repo that @matthewp mentioned: https://github.com/stealjs/steal-tools/issues

https://github.com/stealjs/steal-tools/issues/571