When I first tried to deploy this app to Heroku, I got an error saying no Sequelize config file in the config folder. I then created a config folder and put a config.json file inside it. I am wondering what to put inside it for the web app to work. Leaving it blank just results in an error as well.
Heroku output when leaving it blank:
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): 8.9.0
engines.npm (package.json): unspecified (use default)
Resolving node version 8.9.0...
Downloading and installing node 8.9.0...
Using default npm version: 5.5.1
-----> Installing dependencies
Installing node modules (package.json + package-lock)
> [email protected] install /tmp/build_2706e93a_/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0
> [email protected] install /tmp/build_2706e93a_/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
[bcrypt] Success: "/tmp/build_2706e93a_/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
> [email protected] install /tmp/build_2706e93a_/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/linux-x64-57_binding.node
Download complete
Binary saved to /tmp/build_2706e93a_/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /tmp/npmcache.hpotu/node-sass/4.13.1/linux-x64-57_binding.node
> [email protected] postinstall /tmp/build_2706e93a_/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> [email protected] postinstall /tmp/build_2706e93a_/node_modules/node-sass
> node scripts/build.js
Binary found at /tmp/build_2706e93a_/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
added 1314 packages in 42.263s
-----> Build
Running heroku-postbuild
> [email protected] heroku-postbuild /tmp/build_2706e93a_
> NODE_ENV=production webpack; sequelize db:migrate;
module.js:538
throw err;
^
Error: Cannot find module './config/webpack/public-path'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tmp/build_2706e93a_/webpack.config.server.js:3:20)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
Sequelize CLI [Node: 8.9.0, CLI: 4.0.0, ORM: 5.15.1]
ERROR: Error reading "config/config.json". Error: SyntaxError: /tmp/build_2706e93a_/config/config.json: Unexpected end of JSON input
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] heroku-postbuild: `NODE_ENV=production webpack; sequelize db:migrate;`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] heroku-postbuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.hpotu/_logs/2021-01-10T07_56_49_457Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed