Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example errors #2

Open
index0h opened this issue Mar 17, 2011 · 1 comment
Open

Example errors #2

index0h opened this issue Mar 17, 2011 · 1 comment

Comments

@index0h
Copy link

index0h commented Mar 17, 2011

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') ;
});
});
@Pita
Copy link

Pita commented Apr 9, 2011

I have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants