Thursday, 15 September 2011

node.js - slimerjs Can not resolve required module, works with phantomjs -



node.js - slimerjs Can not resolve required module, works with phantomjs -

i trying create testing script testers can capture tests using standalone slimerjs 0.9.3. when seek require local bundle installed(minimist in case) via npm error.

file structure:

clibrowsers/ /osx/slimer/slimerjs /scripts /batchprinter.js /node_modules/minimist/ ...

when run "clibrowsers/osx/slimer/slimerjs clibrowsers/scripts/batchprinter.js" error:

script error: module: can not resolve "minimist" module required main located @ file:///users/user/documents/dev/clibrowsers/scripts/batchprinter.js stack: -> file:///users/user/documents/dev/clibrowsers/scripts/batchprinter.js: 351

when run script with phantomjs 2.0.0 (development) not errors.

what doing wrong?

slimer cannot find node_modules on own, can load module manually, instance: var uuid = require(fs.workingdirectory+'/node_modules/node-uuid/uuid.js');

see the doc on slimerjs require

node.js slimerjs

No comments:

Post a Comment