Postleaf / postleaf

Simple, beautiful publishing with Node.js.
https://www.postleaf.org/
MIT License
504 stars 204 forks source link

Postleaf failed to start! SequelizeUniqueConstraintError: Validation error #22

Closed lukewatts closed 7 years ago

lukewatts commented 7 years ago

Summary

I've followed the article here for Ubuntu:16.04

https://www.postleaf.org/installing-postleaf-on-digitalocean?v=1

But when I run node app.js I get the following error:

Error: Postleaf failed to start!

SequelizeUniqueConstraintError: Validation error

Not sure where to go from here. Any suggestions what this error means?

Steps to Reproduce

  1. Install git nginx sqlite3 nodejs (7) and graphicsmagick
  2. Clone repo into /var/www/postleaf 3.Clone Empower theme into theme directory
  3. Globally install npm-gyp npm-pre-gyp sqlite3 and sequelize (sudo npm install -g npm-gyp npm-pre-gyp sqlite3 sequelize gulp)
  4. Rebuild the following packages - node-gyp node-sass optipng-bin jpegtran-bin sqlite3 sequelize
  5. Run npm install
  6. Run gulp build
  7. Run node app.js

Additional info

claviska commented 7 years ago

Are you using the code from 1.0.0-alpha.1 or master?

I just released 1.0.0-alpha.2 so I'd recommend using that instead. It has a number of bug fixes, including #9 which should resolve the issue you're having.

If not, comment here and I'll reopen. But I'm pretty sure that will fix it. 😎

lukewatts commented 7 years ago

I'm still getting that error. Which branch are you developing on and which is the stable? The tagged version 1.0.0-alpha.2 still gives me this error.

claviska commented 7 years ago

Dev is on master. If you create the data directory manually, does that resolve it? If so, it's likely a permissions issue. Try checking the owner and permissions.

claviska commented 7 years ago

Going to try a daring livestream of the DigitalOcean tutorial in a sec: https://www.twitch.tv/claviska

lukewatts commented 7 years ago

So I did a chown -R $USER:www-data . AFTER I ran npm install and gulp build and that fixed that error.

claviska commented 7 years ago

Were you logged in as root or as the non-root user? Not sure why that would happen if you ran npm install && gulp build as non-root.

lukewatts commented 7 years ago

I'm not sure either...but setting the permissions just before node app.js sorted it.

venatoria commented 7 years ago

@lukewatts I will test myself and see if that solves it. Akmost sure it's a permission issue indeed

claviska commented 7 years ago

Resolved with 48eb7c4.