Skip to content

Instantly share code, notes, and snippets.

@sylvinus
Created December 14, 2011 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sylvinus/1477703 to your computer and use it in GitHub Desktop.
Save sylvinus/1477703 to your computer and use it in GitHub Desktop.
In my main file:
requirejs.config({
nodeRequire: require,
paths:{
"datajslib":path.resolve("./datajslib.js")
}
});
requirejs(["./databases/"+req.params.db+"/"+req.params.collection],function(DB) {
In the required file :
define(['./lib/api', '../runtime/underscore','../runtime/iso8601','datajslib!lib/api'], function(api, _, iso8601) {
I get this error :
Error: Calling node's require("datajslib") failed with error: Error: Cannot find module 'datajslib'
at /Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:2174:27
at Function.execCb (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:1763:25)
at execManager (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:529:31)
at main (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:906:17)
at callDefMain (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:917:18)
at Object.completeLoad (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:1416:21)
at Function.load (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:2184:17)
at /Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:1162:37
at Object.completeLoad (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:1441:17)
at Function.load (/Users/sylvinus/w/joshfire/data-joshfire/node_modules/requirejs/bin/r.js:2184:17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment