Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14916 closed defect (duplicate)

Build crashes with node.js version 0.6.11

Reported by: dvasquez Owned by: dvasquez
Priority: undecided Milestone: tbd
Component: BuildSystem Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by ben hockey)

Setup a clean centos 6 vm with dojo-boilerplate and node 0.6.11

Build succeeds when I revert node to 0.6.9. Did not try 0.6.10.

        throw e; // process.nextTick error, or 'error' event on first tick
ReferenceError: location is not defined
    at /root/dojo-boilerplate/src/dojo/dojo.js:237:27
    at Object.<anonymous> (/root/dojo-boilerplate/src/dojo/dojo.js:1787:2)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

Change History (10)

comment:1 Changed 10 years ago by dvasquez

Apologies for the accidental lack of formatting.

comment:2 Changed 10 years ago by ben hockey

Description: modified (diff)

comment:3 Changed 10 years ago by bill

Sounds like #14260 which was marked as fixed, but this is the second person saying that it still doesn't work.

comment:4 Changed 10 years ago by dvasquez

Ah! I saw that bug but didn't see the new error that was added to it until now. It's definitely the same error but should probably still be a new bug. The fix for 14260 I believe was just removing the call to .end() since it's not part of node's api anymore. In this case, it looks like a different problem altogether since it's crashing in the middle of what should be browser dom/location stuff.

Of course I could be wrong. :)

comment:5 Changed 10 years ago by dvasquez

So, after a little more digging. This isn't exactly a dojo bug. This is actually related to the rpms installed from They're actually linked to from the website from the "Installing with a package manager" link from the "Download" button.

They rename the node binary to avoid a naming conflict with another fedora package by the same name. They provide a symlink update if you're not using the "other" node but if you don't do that, this edge case rears it's ugly head.

I usually compile node.js from source but I was trying to resolve build errors in a clean environment and so quickly installed from their rpm.

So, adding another optional to the regex in the 'host-node' has detection solves this.

dojo/dojo.js, line 145 becomes:

has.add("host-node", typeof process == "object" && /node(js)?(\.exe)?$/.test(process.execPath));

comment:6 Changed 10 years ago by ben hockey

Owner: changed from Rawld Gill to dvasquez
Status: newpending

i just noticed that in trunk we've changed that test already as of r27539. does the code in trunk fix it for you dvasquez?

comment:7 Changed 10 years ago by dvasquez

Status: pendingnew

Yes, that code does fix this issue. And it's a much better test.

comment:8 Changed 10 years ago by ben hockey

Resolution: duplicate
Status: newclosed

Duplicate of #14540.
ok. i'm closing as a duplicate of #14540 which was fixed by r27539

comment:9 Changed 10 years ago by JoshNewman

Just a quick note. #14540 has changed from closed to re-assigned. We just spent 20min figuring out that it's not fixed fro 1.7.2.

comment:10 Changed 10 years ago by ben hockey

unfortunately #14540 was not in 1.7.2 since we don't always port changes in trunk to branches. however, 3 months ago, #14540 was marked as being targeted for 1.8. the recent change of state is to ask to have it included in 1.7.3 if/when such a thing should ever exist. sorry if you thought any of that meant that it would be in 1.7.2

Note: See TracTickets for help on using tickets.