Closed exejutable closed 8 years ago
Try this, this worked for me.
//npm install jinq For Local //npm install -g jinq For Global
//var jinqJs = require('./node_modules/jinq'); //Local var jinqJs = require('jinq'); //Global
var data = [{Name: 'Tom'}, {Name: 'Frank'}]
var results = new jinqJs().from(data).select();
console.log(results);
what is your node v?
Sorry for the delay, v4.2.4
I do a install of jinq sudo npm install -g jinq and npm install jinq in both set the variable var jinqJs = require('jinq'); , when i run my app node returns
Error: Cannot find module 'jinq' at Function.Module._resolveFilename (module.js:339:15) at Function.Module._load (module.js:290:25) at Module.require (module.js:367:17) at require (internal/module.js:16:19) at Object.<anonymous> (/var/www/html/JobAdminApi/src/models/ymlGenerator.js:18:14) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17)
I create a clean project only with var jinqJs = require('jinq'); and returns the same error. The version is "jinq": "1.5.9",