`Error: define is not a function` when using `deps-bundle`
eben-roux opened this issue · comments
I am using steal-tools
v1.11.9 and when the application loads Error: define is not a function
appears in the console.
To be sure I deleted the node_modules
from the steal-tools
global folder and re-installed and did the same for my application but to no avail.
Can you provide more information like a stack trace and the code snippet that is throwing? This is possibly coming from a dependency.
First I would run the bundle command with --no-minify
so you can see better what is going on. Then I would click on the first link in the stack trace. It should take you to the code, copy and paste what you see there.
It appears as though the minifying may be contributing to the original issue.
By using the --no-minify
option I do not get the error.
@eben-roux What version of steal-tools?
@m-mujica Does this sound at all like the infamous dev bundles regexp issue?
steal-tools
: 1.11.9
@matthewp yeah, seems like it, Eben is using the latest version tho and looking at the screenshots it seems the module preloading the npm stuff is indeed at the bottom of the bundle.
We only prepend the bundles config, I don't think there is anything there that might break the regex.
OK, so the comma doesn't seem to affect anything. However, when I compared the working minified code from Manuel's branch to the current one the ordering is definitely out of whack.
However, upon further investigation it turns out that the graph ordering on what appears to be the same level is non-deterministic which is why it looks slightly different each time the graph is built. Slightly odd but shouldn't be a problem.