Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#13501 closed defect (fixed)

claro's compile.js uses now-defunct require.paths

Reported by: Sam Foster Owned by: nonken
Priority: high Milestone: 1.8
Component: themes Version: 1.7.0b1
Keywords: Cc: bill
Blocked By: Blocking:


Testing compile.js on the latest node (0.5.2) I get the following error:

        throw e; // process.nextTick error, or 'error' event on first tick
GetConsoleTitleW: The access code is invalid.
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
    at Function.<anonymous> (module.js:360:11)
    at Object.<anonymous> (y:\trunk\dijit\themes\claro\compile.js:7:8)
    at Module._compile (module.js:420:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:335:31)
    at Function._load (module.js:294:12)
    at Array.<anonymous> (module.js:479:10)
    at EventEmitter._tickCallback (node.js:187:26)

Change History (8)

comment:1 Changed 11 years ago by Sam Foster

Cc: bill added

node ditched the ability to manipulate require.paths in 0.5, and their recommendation now is to create a local node_modules directory for libraries:

Less is a package with its own submodules defined by the package.json. I'm not clear right now how this is supposed to look in the new node_modules world, or if perhaps we should create a batch/shell script which sets the NODE_PATH environment variable and kicks off node compile.js

comment:2 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

In [26100]:

Remove usage of require.paths, since it's no longer supported by node, and instead check in less library, and reference it with a relative path. Fixes #13501 !strict.

comment:3 Changed 11 years ago by bill

Milestone: tbd1.7

Please check that the above checkin is working for you too.

comment:4 Changed 11 years ago by ben hockey

fyi node 0.5 is an "unstable" release and the usage of require.paths is fairly widespread. in a number of projects i follow, its common that they are waiting for node 0.6 (a stable release) before they bother with updating their code to remove the usage of require.paths. there's no question that require.paths is removed forever but many people just aren't bothering to be compatible with an unstable release. it's common to hear that a project only supports the stable releases of node and as such users are told to use node 0.4 until node 0.6 is released.

comment:5 Changed 11 years ago by bill

In [26168]:

List less version number, refs #13501 !strict.

comment:6 Changed 11 years ago by bill

In [26532]:

Doc parser chokes on less directory, so avoid it. Just skipping all of util. Refs #13501.

comment:7 Changed 10 years ago by bill

#15439 is a duplicate of this ticket.

comment:8 Changed 10 years ago by bill

Milestone: 1.71.8

Less itself was updated in [27466], so really this is fixed in 1.8 not 1.7.

Note: See TracTickets for help on using tickets.