Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a postgres database and want to set the dialect on sequelize as postgres. I followed all the instructions on the sequelize.js site mainly:

var Sequelize = require("sequelize");
var sequelize = new Sequelize('database', 'postgres', 'pword', {
host: "localhost", //your server
port: 5432 //server port
dialect: 'postgres' 
});

I also did these modifications in the package.json file:

"name": "hello-world",
"description": "hello world test app",
"version": "0.0.1",
"private": true,
"dependencies": {
  "express": "3.1",
  "pg": "0.8.8",
  "sequelize": "1.6.x"
}

But when I try to run node app.js I get this error: dialect: 'postgres' ^^^^^^^ SyntaxError: Unexpected identifier at Module._compile (module.js:437:25)

I'm really confused what is going on, and why I'm still getting this error. Any ideas on how to fix this?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Try removing the comment lines after host and port.

share|improve this answer
    
you are a lifesaver –  user1054740 Mar 15 '13 at 22:28
    
My pleasure. Getting started can be the hardest part, but I've been really happy with Sequelize after two intense months. Stick with it. –  dankohn Mar 16 '13 at 11:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.