paldepind / synceddb

Makes it easy to write offline-first applications with realtime syncing and server side persistence.
MIT License
411 stars 34 forks source link

pgPersistence strict mode error #35

Closed awitherow closed 8 years ago

awitherow commented 8 years ago

First of all, really thank you @paldepind ! This is a great first step in my app going offline-first.

I am currently implementing synceddb in a PR on my own personal app and my server continues to crash with the following error:

.../aether/node_modules/synceddb-persistence-postgres/index.js:11
let nextKey;
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

The pull request that I am developing on can be found here:

https://github.com/awitherow/aether/pull/36

questions...

  1. Am I doing something wrong?
  2. Is it okay to not use the server with the rest of the code I'm using on the client side?
piglovesyou commented 8 years ago
  1. No, only I didn't write "use strict"; on top of the files (you might use v4?). I'm glad if you give me a PR.
  2. OK without syncing
piglovesyou commented 8 years ago

@awitherow Please try newer module, it should work.

paldepind commented 8 years ago

First of all, really thank you @paldepind ! This is a great first step in my app going offline-first.

You should thank @piglovesyou as well :smile: He has done a lot of great work on this as well.