jimmylee / next-postgres-sequelize

[OUTDATED] React 16.8.4 + NextJS 8.0.3 + Emotion + Sequelize 5/Postgres + Passport Local Auth + Google App Engine or Heroku Deployment
https://next-postgres.herokuapp.com/
MIT License
181 stars 39 forks source link

Building Production Version with Now? #8

Closed idkjs closed 6 years ago

idkjs commented 6 years ago

Have you tried running the production build?

I get the following error: error next-postgres@1.0.0: The engine "node" is incompatible with this module. Expected version "10.6.0".

Works if you take out the engine key in package.json. Is that expected?

Full error:

next-postgres-now$ now --public
> Deploying ~/Downloads/next-postgres-now under idkjs
> Synced 1 file (3.37KB) [985ms]
> WARN! Requested node version 10.6.0 is not available
> Using Node.js 8.11.3 (default)
> https://next-postgres-kkgivgnkry.now.sh [in clipboard] (bru1) [5s]
> Building…
> ▲ yarn
> yarn install v1.9.4
> info No lockfile found.
> [1/5] Validating package.json...
> error next-postgres@1.0.0: The engine "node" is incompatible with this module. Expected version "10.6.0".
> Logs from deployments of your account are rate limited. The reason is "writes from reason-docker-server-master-ydunocaape.now.sh". Please upgrade your plan.
> info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> Error! Build failed

Great Project. Thanks for sharing.

jimmylee commented 6 years ago

@idkjs thank you so much for bringing this to my attention!!

This was a mistake.

Luckily, someone needed my help with Heroku deploys so I went through and revised everything. Now we are using 10.7.0 and it should work.

We are also using NextJS 7.0.0 and a non-beta version of Babel. 🎊

idkjs commented 6 years ago

Tried the updated version. Following your commands gets you this error.

PrisBook:next-postgres$[master !] sequelize db:migrate

Sequelize CLI [Node: 10.6.0, CLI: 4.1.1, ORM: 4.38.1]

Loaded configuration file "config.js".
Using environment "development".

ERROR: Please install 'pg' module manually

Got it working with by running local sequelize per suggestion here https://github.com/sequelize/sequelize-auto/issues/109

./node_modules/.bin/sequelize db:migrate

Deployment with now failed but cant tell you why yet. Will send a note when i get to it.

This is the error:

> [8:04:42 AM] Compiled server in 6s
> npm WARN checkPermissions Missing write access to /usr/lib/node_modules
> npm ERR! path /usr/lib/node_modules
> npm ERR! code EACCES
> npm ERR! errno -13
> npm ERR! syscall access
> npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
> npm ERR!  { [Error: EACCES: permission denied, access '/usr/lib/node_modules']
> Error! Build failed
jeremyng123 commented 5 years ago

@idkjs have this error been solved? i have been searching for a solution for this problem but to no avail... :(

idkjs commented 5 years ago

@jeremyng123 havent been back to it, brother.