Hi, I've tried execute example on https://github.com/pgte/alfred , there are 2 syntax errors [10,19 lines missing } and ) ]. But still not working((
Error:
/usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/commands/._sync.js:1
^
node.js:178
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:399:25)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
at /usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/master.js:14:43
at Array.forEach (native)
at /usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/master.js:12:14
at Object. (/usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/master.js:17:4)
at Module._compile (module.js:404:26)
Source:
var Alfred = require('alfred');
// Open database
Alfred.open('./test', function(err, db) {
if (err) { throw err; }
// define User model and its properties
var User = db.define('User', {
indexes: [{name: 'age',
fn: function(user) { return user.age; }}]
});
User.property('name', 'string', {
maxLength: 100
});
User.property('active', 'boolean');
// get user by id
User.get(id, function(user) {
console.log(user.inspect());
});
// find users
User.find({age: {$gt: 18}}).all(function(users) {
console.log('Found ' + users.length + ' users with more than 18 years') ;
});
});
Hi, I've tried execute example on https://github.com/pgte/alfred , there are 2 syntax errors [10,19 lines missing } and ) ]. But still not working(( Error: /usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/commands/._sync.js:1 ^ node.js:178 throw e; // process.nextTick error, or 'error' event on first tick ^ SyntaxError: Unexpected token ILLEGAL at Module._compile (module.js:399:25) at Object..js (module.js:410:10) at Module.load (module.js:336:31) at Function._load (module.js:297:12) at require (module.js:348:19) at /usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/master.js:14:43 at Array.forEach (native) at /usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/master.js:12:14 at Object. (/usr/local/lib/node/.npm/alfred/0.5.2b3/package/lib/alfred/meta/replication/master.js:17:4)
at Module._compile (module.js:404:26)
Source: var Alfred = require('alfred'); // Open database Alfred.open('./test', function(err, db) { if (err) { throw err; }