Related
My program crashes. the website does not even load for a second. It loads until the program crashes. I tried changing the JSON and the Procfile but nothing seems to work. I tried restarting Heroku and I have no env variables, but nothing worked though.
Here are the Heroku logs:
2023-02-05T23:53:55.000000+00:00 app[api]: Build succeeded
2023-02-05T23:54:01.544863+00:00 heroku[web.1]: Starting process with command `npm start`
2023-02-05T23:54:03.163211+00:00 app[web.1]:
2023-02-05T23:54:03.163238+00:00 app[web.1]: > modal-react#0.1.0 start /app
2023-02-05T23:54:03.163238+00:00 app[web.1]: > react-scripts start
2023-02-05T23:54:03.163239+00:00 app[web.1]:
2023-02-05T23:54:05.047020+00:00 heroku[web.1]: State changed from starting to up
2023-02-05T23:54:04.946662+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.18.62.238/
2023-02-05T23:54:04.946860+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2023-02-05T23:54:04.946902+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2023-02-05T23:54:04.946928+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2023-02-05T23:54:04.947288+00:00 app[web.1]: Starting the development server...
2023-02-05T23:54:04.947288+00:00 app[web.1]:
2023-02-05T23:54:36.531206+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=mymedicineislqatar.herokuapp.com request_id=39c2b9ef-437e-4436-ad00-3112613f8575 fwd="37.210.130.204" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2023-02-05T23:54:39.448024+00:00 app[web.1]:
2023-02-05T23:54:39.448049+00:00 app[web.1]: <--- Last few GCs --->
2023-02-05T23:54:39.448049+00:00 app[web.1]:
2023-02-05T23:54:39.448050+00:00 app[web.1]: [27:0x52a4a20] 35980 ms: Scavenge (reduce) 244.9 (256.0) -> 244.4 (257.3) MB, 0.6 / 0.0 ms (average mu = 0.769, current mu = 0.791) allocation failure
2023-02-05T23:54:39.448050+00:00 app[web.1]: [27:0x52a4a20] 35984 ms: Scavenge (reduce) 245.0 (256.3) -> 244.7 (257.5) MB, 0.6 / 0.0 ms (average mu = 0.769, current mu = 0.791) allocation failure
2023-02-05T23:54:39.448051+00:00 app[web.1]: [27:0x52a4a20] 35987 ms: Scavenge (reduce) 245.3 (256.5) -> 244.8 (257.8) MB, 0.5 / 0.0 ms (average mu = 0.769, current mu = 0.791) allocation failure
2023-02-05T23:54:39.448051+00:00 app[web.1]:
2023-02-05T23:54:39.448055+00:00 app[web.1]:
2023-02-05T23:54:39.448055+00:00 app[web.1]: <--- JS stacktrace --->
2023-02-05T23:54:39.448055+00:00 app[web.1]:
2023-02-05T23:54:39.448056+00:00 app[web.1]: FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
2023-02-05T23:54:39.448844+00:00 app[web.1]: 1: 0xa24ed0 node::Abort() [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.449459+00:00 app[web.1]: 2: 0x966115 node::FatalError(char const*, char const*) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.450119+00:00 app[web.1]: 3: 0xb9acde v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.450762+00:00 app[web.1]: 4: 0xb9b057 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.451531+00:00 app[web.1]: 5: 0xd56ea5 [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.452289+00:00 app[web.1]: 6: 0xd87a8e v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.453046+00:00 app[web.1]: 7: 0xd93ac6 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.453790+00:00 app[web.1]: 8: 0xd7fc5f v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.454550+00:00 app[web.1]: 9: 0xd7fed8 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.455206+00:00 app[web.1]: 10: 0xd727b9 v8::internal::ItemParallelJob::Run() [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.455880+00:00 app[web.1]: 11: 0xd95a20 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.456513+00:00 app[web.1]: 12: 0xd962bc v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.457199+00:00 app[web.1]: 13: 0xd96485 v8::internal::MarkCompactCollector::Evacuate() [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.457819+00:00 app[web.1]: 14: 0xda8481 v8::internal::MarkCompactCollector::CollectGarbage() [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.458407+00:00 app[web.1]: 15: 0xd64748 v8::internal::Heap::MarkCompact() [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.459057+00:00 app[web.1]: 16: 0xd66238 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.459755+00:00 app[web.1]: 17: 0xd6967c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.460492+00:00 app[web.1]: 18: 0xd2ee1d v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.461168+00:00 app[web.1]: 19: 0xd2b079 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.461776+00:00 app[web.1]: 20: 0xd2b134 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.462477+00:00 app[web.1]: 21: 0xf6d5af v8::internal::BaseNameDictionary<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::CollectKeysTo(v8::internal::Handle<v8::internal::NameDictionary>, v8::internal::KeyAccumulator*) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.463220+00:00 app[web.1]: 22: 0xf2753b v8::internal::KeyAccumulator::CollectOwnPropertyNames(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::JSObject>) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.463897+00:00 app[web.1]: 23: 0xf2790f v8::internal::KeyAccumulator::CollectOwnKeys(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::JSObject>) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.464596+00:00 app[web.1]: 24: 0xf28781 v8::internal::KeyAccumulator::CollectKeys(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::JSReceiver>) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.465376+00:00 app[web.1]: 25: 0xf28edc v8::internal::FastKeyAccumulator::GetKeysSlow(v8::internal::GetKeysConversion) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.466182+00:00 app[web.1]: 26: 0xf29031 v8::internal::KeyAccumulator::GetKeys(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::KeyCollectionMode, v8::internal::PropertyFilter, v8::internal::GetKeysConversion, bool, bool) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.466983+00:00 app[web.1]: 27: 0xf177b3 v8::internal::JSReceiver::SetOrCopyDataProperties(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::ScopedVector<v8::internal::Handle<v8::internal::Object> > const*, bool) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.467718+00:00 app[web.1]: 28: 0x1098060 v8::internal::Runtime_SetDataProperties(int, unsigned long*, v8::internal::Isolate*) [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.468516+00:00 app[web.1]: 29: 0x1427099 [/app/.heroku/node/bin/node]
2023-02-05T23:54:39.495089+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2023-02-05T23:54:39.495260+00:00 app[web.1]: npm ERR! errno 1
2023-02-05T23:54:39.497846+00:00 app[web.1]: npm ERR! modal-react#0.1.0 start: `react-scripts start`
2023-02-05T23:54:39.497902+00:00 app[web.1]: npm ERR! Exit status 1
2023-02-05T23:54:39.497966+00:00 app[web.1]: npm ERR!
2023-02-05T23:54:39.498018+00:00 app[web.1]: npm ERR! Failed at the modal-react#0.1.0 start script.
2023-02-05T23:54:39.498066+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-02-05T23:54:39.504341+00:00 app[web.1]:
2023-02-05T23:54:39.504445+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2023-02-05T23:54:39.504504+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2023-02-05T23_54_39_498Z-debug.log
2023-02-05T23:54:39.629101+00:00 heroku[web.1]: Process exited with status 1
2023-02-05T23:54:39.489515+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/favicon.ico" host=mymedicineislqatar.herokuapp.com request_id=f91207ad-031d-45e5-8b63-bdb0b7dff9a6 fwd="37.210.130.204" dyno=web.1 connect=0ms service=2512ms status=503 bytes=0 protocol=https
2023-02-05T23:54:39.701388+00:00 heroku[web.1]: State changed from up to crashed
2023-02-05T23:54:39.706529+00:00 heroku[web.1]: State changed from crashed to starting
2023-02-05T23:54:49.290975+00:00 heroku[web.1]: Starting process with command `npm start`
2023-02-05T23:54:50.883106+00:00 app[web.1]:
2023-02-05T23:54:50.883138+00:00 app[web.1]: > modal-react#0.1.0 start /app
2023-02-05T23:54:50.883140+00:00 app[web.1]: > react-scripts start
2023-02-05T23:54:50.883140+00:00 app[web.1]:
2023-02-05T23:54:52.657245+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Project is running at http://172.18.245.202/
2023-02-05T23:54:52.657424+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: webpack output is served from
2023-02-05T23:54:52.657465+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
2023-02-05T23:54:52.657494+00:00 app[web.1]: [34mℹ[39m [90m「wds」[39m: 404s will fallback to /
2023-02-05T23:54:52.657852+00:00 app[web.1]: Starting the development server...
2023-02-05T23:54:52.657853+00:00 app[web.1]:
2023-02-05T23:54:53.193812+00:00 heroku[web.1]: State changed from starting to up
2023-02-05T23:55:28.206144+00:00 app[web.1]:
2023-02-05T23:55:28.206176+00:00 app[web.1]: <--- Last few GCs --->
2023-02-05T23:55:28.206176+00:00 app[web.1]:
2023-02-05T23:55:28.206178+00:00 app[web.1]: [27:0x5606a20] 36994 ms: Scavenge (reduce) 245.1 (256.3) -> 244.5 (257.5) MB, 0.6 / 0.0 ms (average mu = 0.779, current mu = 0.780) allocation failure
2023-02-05T23:55:28.206179+00:00 app[web.1]: [27:0x5606a20] 37008 ms: Scavenge (reduce) 245.4 (256.5) -> 244.9 (257.5) MB, 0.9 / 0.0 ms (average mu = 0.779, current mu = 0.780) allocation failure
2023-02-05T23:55:28.206179+00:00 app[web.1]: [27:0x5606a20] 37019 ms: Scavenge (reduce) 245.7 (256.5) -> 245.2 (257.8) MB, 1.0 / 0.0 ms (average mu = 0.779, current mu = 0.780) allocation failure
2023-02-05T23:55:28.206179+00:00 app[web.1]:
2023-02-05T23:55:28.206184+00:00 app[web.1]:
2023-02-05T23:55:28.206184+00:00 app[web.1]: <--- JS stacktrace --->
2023-02-05T23:55:28.206185+00:00 app[web.1]:
2023-02-05T23:55:28.206201+00:00 app[web.1]: FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
2023-02-05T23:55:28.206802+00:00 app[web.1]: 1: 0xa24ed0 node::Abort() [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.207254+00:00 app[web.1]: 2: 0x966115 node::FatalError(char const*, char const*) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.207773+00:00 app[web.1]: 3: 0xb9acde v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.208271+00:00 app[web.1]: 4: 0xb9b057 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.208861+00:00 app[web.1]: 5: 0xd56ea5 [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.209460+00:00 app[web.1]: 6: 0xd87a8e v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.210082+00:00 app[web.1]: 7: 0xd93ac6 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.210681+00:00 app[web.1]: 8: 0xd7fc5f v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.211286+00:00 app[web.1]: 9: 0xd7fed8 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.211906+00:00 app[web.1]: 10: 0xd727b9 v8::internal::ItemParallelJob::Run() [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.212496+00:00 app[web.1]: 11: 0xd95a20 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.213095+00:00 app[web.1]: 12: 0xd962bc v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.213693+00:00 app[web.1]: 13: 0xd96485 v8::internal::MarkCompactCollector::Evacuate() [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.214312+00:00 app[web.1]: 14: 0xda8481 v8::internal::MarkCompactCollector::CollectGarbage() [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.214903+00:00 app[web.1]: 15: 0xd64748 v8::internal::Heap::MarkCompact() [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.215517+00:00 app[web.1]: 16: 0xd66238 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.216130+00:00 app[web.1]: 17: 0xd6967c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.216707+00:00 app[web.1]: 18: 0xd2ee1d v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.217290+00:00 app[web.1]: 19: 0xd28ca4 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.217888+00:00 app[web.1]: 20: 0xd2acb0 v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString(int, v8::internal::AllocationType) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.218557+00:00 app[web.1]: 21: 0xf8d18a v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::ConsString>, v8::internal::AllocationType) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.219204+00:00 app[web.1]: 22: 0xf90565 v8::internal::String::SlowEquals(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::String>) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.219901+00:00 app[web.1]: 23: 0x10be8b7 v8::internal::Runtime_StringEqual(int, unsigned long*, v8::internal::Isolate*) [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.220642+00:00 app[web.1]: 24: 0x1427099 [/app/.heroku/node/bin/node]
2023-02-05T23:55:28.248461+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2023-02-05T23:55:28.248625+00:00 app[web.1]: npm ERR! errno 1
2023-02-05T23:55:28.251223+00:00 app[web.1]: npm ERR! modal-react#0.1.0 start: `react-scripts start`
2023-02-05T23:55:28.251271+00:00 app[web.1]: npm ERR! Exit status 1
2023-02-05T23:55:28.251326+00:00 app[web.1]: npm ERR!
2023-02-05T23:55:28.251371+00:00 app[web.1]: npm ERR! Failed at the modal-react#0.1.0 start script.
2023-02-05T23:55:28.251410+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-02-05T23:55:28.256461+00:00 app[web.1]:
2023-02-05T23:55:28.256545+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2023-02-05T23:55:28.256587+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2023-02-05T23_55_28_251Z-debug.log
2023-02-05T23:55:28.387360+00:00 heroku[web.1]: Process exited with status 1
2023-02-05T23:55:28.242228+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=mymedicineislqatar.herokuapp.com request_id=37e088cf-76a2-4ddf-803a-fa544c8aa355 fwd="37.210.130.204" dyno=web.1 connect=0ms service=19863ms status=503 bytes=0 protocol=https
2023-02-05T23:55:28.433328+00:00 heroku[web.1]: State changed from up to crashed
2023-02-05T23:55:33.626857+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mymedicineislqatar.herokuapp.com request_id=068075b9-bb44-4c91-8f0b-0cba807c2d87 fwd="37.210.130.204" dyno=web.1 connect=5002ms service= status=503 bytes= protocol=https
package.json file:
{
"name": "modal-react",
"version": "0.1.0",
"engines": {
"node": "14.17.1"
},
"private": true,
"dependencies": {
"#fontsource/manrope": "^4.5.11",
"#material-ui/core": "^4.11.4",
"#material-ui/icons": "^4.11.2",
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"i": "^0.3.7",
"install": "^0.13.0",
"lightbox.js-react": "^0.3.3",
"npm": "^8.18.0",
"react": "^17.0.2",
"react-animated-slider": "^1.1.4",
"react-dom": "^17.0.2",
"react-icons": "^4.4.0",
"react-image-file-resizer": "^0.4.8",
"react-router-dom": "5.2.0",
"react-scripts": "4.0.3",
"react-slideshow-image": "^4.1.0",
"react-smart-slider": "^0.1.2",
"styled-components": "^5.3.5",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"nodemon": "^2.0.20"
}
}
Procfile:
web:npm start
For some odd reason (i have been deployed on Heroku for around 1.5 years) my instance decided to throw a weird error regarding not finding 'mongoose' after attempting to deploy again. Everything works on my local server and my .gitignore file ignores Node Modules. This is a React.js app with Expressjs and Mongoose.
Here is my Package.json:
{
"name": "drg-coming-soon",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"server": "node server/index.js",
"start": "webpack && node server/index.js",
"react": "webpack -d --watch"
},
"heroku-run-build-script": true,
"author": "Randy Thomas",
"license": "ISC",
"devDependencies": {
"axios": "^0.18.0",
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.23.0",
"body-parser": "^1.18.3",
"express": "^4.15.0",
"jquery": "^3.1.1",
"mongoose": "^6.2.7",
"react-awesome-modal": "^2.0.5",
"request": "^2.81.0",
"webpack": "^4.28.3"
},
"dependencies": {
"axios": "^0.18.0",
"css-loader": "^2.0.1",
"dotenv": "^6.2.0",
"file-loader": "^2.0.0",
"react": "^15.4.2",
"react-autosuggest": "^9.4.3",
"react-dom": "^15.4.2",
"react-image": "^1.5.1",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts": "^2.1.1",
"style-loader": "^0.23.1",
"twilio": "^3.33.2",
"url-loader": "^1.1.2",
"mongoose": "^6.2.7",
"webpack": "^4.28.3"
}
}
Here is my webpack.config.js
const path = require('path');
const SRC_DIR = path.join(__dirname, '/client/src');
const DIST_DIR = path.join(__dirname, '/client/dist');
module.exports = {
entry: `${SRC_DIR}/index.js`,
output: {
filename: 'bundle.js',
path: DIST_DIR,
},
module: {
//changed from loaders to rules
loaders: [
{
test: /\.jsx?/,
include: SRC_DIR,
loader: 'babel-loader',
query: {
presets: [
'#babel/preset-env',
'#babel/preset-react'
],
},
},
],
},
};
Here is my Database folder:
require('dotenv').config();
const mongoose = require('mongoose');
// dev
// process.env.mongourl
mongoose.connect(process.env.mongourl)
.catch(err => console.log('Mongo connection error', err));
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', () => {
console.log('MongoDB has connected');
});
// schemas
const comingSoonSchema = ({
address: String,
desc: String,
sqft: Number,
bed: String,
bath: String,
photoLink: String,
agent: String,
price: String,
year: Number,
eta: String,
premarket: String,
status: String,
timeStamp: { type: Date, default: Date.now },
})
// models
const ComingSoon = mongoose.model('ComingSoon', comingSoonSchema);
function save(e) {
console.log(e, "SAVE FUNC");
const obj = new ComingSoon({
address: e.address,
desc: e.desc,
sqft: e.sqft,
bed: e.bed,
bath: e.bath,
photoLink: e.photoLink,
agent: e.agent,
price: e.price,
year: e.year,
eta: e.eta,
status: e.status,
premarket: e.premarket
})
obj.save();
console.log("Data saved to MongoDB Database");
}
const funcs = {
save, ComingSoon,
};
module.exports = funcs;
And lastly here is the persisting error:
2022-03-23T01:33:06.685994+00:00 heroku[web.1]: Starting process with command `npm start`
2022-03-23T01:33:07.919434+00:00 app[web.1]:
2022-03-23T01:33:07.919447+00:00 app[web.1]: > drg-coming-soon#1.0.0 start
2022-03-23T01:33:07.919448+00:00 app[web.1]: > webpack && node server/index.js
2022-03-23T01:33:07.919448+00:00 app[web.1]:
2022-03-23T01:33:07.965317+00:00 app[web.1]: One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
2022-03-23T01:33:07.965319+00:00 app[web.1]: - webpack-cli (https://github.com/webpack/webpack-cli)
2022-03-23T01:33:07.965319+00:00 app[web.1]: The original webpack full-featured CLI.
2022-03-23T01:33:07.965784+00:00 app[web.1]: We will use "npm" to install the CLI via "npm install -D".
2022-03-23T01:33:08.131129+00:00 app[web.1]: Do you want to install 'webpack-cli' (yes/no): node:internal/modules/cjs/loader:936
2022-03-23T01:33:08.131131+00:00 app[web.1]: throw err;
2022-03-23T01:33:08.131131+00:00 app[web.1]: ^
2022-03-23T01:33:08.131132+00:00 app[web.1]:
2022-03-23T01:33:08.131132+00:00 app[web.1]: Error: Cannot find module 'mongoose'
2022-03-23T01:33:08.131132+00:00 app[web.1]: Require stack:
2022-03-23T01:33:08.131133+00:00 app[web.1]: - /app/database/index.js
2022-03-23T01:33:08.131136+00:00 app[web.1]: - /app/server/index.js
2022-03-23T01:33:08.131136+00:00 app[web.1]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
2022-03-23T01:33:08.131137+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:778:27)
2022-03-23T01:33:08.131137+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1005:19)
2022-03-23T01:33:08.131138+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:102:18)
2022-03-23T01:33:08.131138+00:00 app[web.1]: at Object.<anonymous> (/app/database/index.js:2:18)
2022-03-23T01:33:08.131139+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-03-23T01:33:08.131139+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-03-23T01:33:08.131140+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:981:32)
2022-03-23T01:33:08.131140+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-03-23T01:33:08.131140+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1005:19) {
2022-03-23T01:33:08.131141+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2022-03-23T01:33:08.131141+00:00 app[web.1]: requireStack: [ '/app/database/index.js', '/app/server/index.js' ]
2022-03-23T01:33:08.131142+00:00 app[web.1]: }
2022-03-23T01:33:08.265674+00:00 heroku[web.1]: Process exited with status 1
2022-03-23T01:33:08.447674+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-23T01:32:58.202124+00:00 app[api]: Release v158 created by user bookingrlthomas#gmail.com
2022-03-23T01:32:58.202124+00:00 app[api]: Deploy ad551b5e by user bookingrlthomas#gmail.com
2022-03-23T01:33:00.927332+00:00 app[api]: Deploy ad551b5e by user bookingrlthomas#gmail.com
2022-03-23T01:33:00.927332+00:00 app[api]: Release v159 created by user bookingrlthomas#gmail.com
2022-03-23T01:33:51.331557+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=drgcomingsoonlistings.herokuapp.com request_id=fd27788b-e166-49fd-8830-b0da493e7e62 fwd="47.45.81.207" dyno= connect= service= status=503 bytes= protocol=https
2022-03-23T01:33:52.166634+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=drgcomingsoonlistings.herokuapp.com request_id=4967681e-a5a9-41b9-9129-65258f9b9983 fwd="47.45.81.207" dyno= connect= service= status=503 bytes= protocol=https
The error is most likely coming from the fact that you have mongoose in your "devDependencies". Try moving it to your "dependencies", then running npm install. You may run into the same issue with express and a few others under "devDependencies". Hope this helps.
It does not make any sense, but if mongoose is both in dev dependencies and in dependencies, heroku goes nuts. It can be ONLY in dependencies. After deleting it from dev dependencies, do npm install. It will work without any issues.
I developed an app using the managed expo workflow, however it's required to use a native apis (in this case WebRTC) and therefore I ran expo eject to switch to the bare workflow. However, I am getting weird errors when I try to run the app with react-native run-ios:
info Found Xcode workspace "myproject.xcworkspace"
info Launching iPhone 12 (iOS 15.4)
info Building (using "xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=4241C8A8-2BAC-45DD-A4A6-BBFC23A6C709")
(node:5087) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening myproject.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=4241C8A8-2BAC-45DD-A4A6-BBFC23A6C709
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: 5e9a8a54370fc02b46865b3cdf7c6f3f
Build description path: /Users/TheCorsError/Library/Developer/Xcode/DerivedData/myproject-urtidjsdfafeadfdcoawhoyie/Build/Intermediates.noindex/XCBuildData/5e9a8a54370fc02b46865b3cdf7c6f3f-desc.xcbuild
note: Build preparation complete
note: Building targets in dependency order
PhaseScriptExecution Start\ Packager /Users/TheCorsError/Library/Developer/Xcode/DerivedData/myproject-urtidjsdfafeadfdcoawhoyie/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Script-FD10A7F022414F080027D42C.sh (in target 'myproject' from project 'myproject')
cd /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios
/bin/sh -c /Users/TheCorsError/Library/Developer/Xcode/DerivedData/myproject-urtidjsdfafeadfdcoawhoyie/Build/Intermediates.noindex/myproject.build/Debug-iphonesimulator/myproject.build/Script-FD10A7F022414F080027D42C.sh
The file /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios/Vorlage/mobile/source-expo/node_modules/react-native/scripts/launchPackager.command does not exist.
Can't start packager automatically
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'myproject' from project 'myproject')
error: no such module 'ExpoModulesCore'
import ExpoModulesCore
^
Command EmitSwiftModule failed with a nonzero exit code
error: emit-module command failed with exit code 1 (use -v to see invocation)
objc[5100]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1049784f8). One of the two will be used. Which one is undefined.
objc[5100]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978548). One of the two will be used. Which one is undefined.
objc[5100]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978598). One of the two will be used. Which one is undefined.
objc[5100]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1049785e8). One of the two will be used. Which one is undefined.
objc[5100]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x20ae69ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978638). One of the two will be used. Which one is undefined.
objc[5100]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x20ae6a040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104978688). One of the two will be used. Which one is undefined.
2022-03-19 15:49:45.188 xcodebuild[5100:60119] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-03-19 15:49:45.188 xcodebuild[5100:60119] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios/myproject/noop-file.swift (in target 'myproject' from project 'myproject')
CompileSwift normal x86_64 /Users/TheCorsError/Documents/Code/rn-project/mobile/source-expo/ios/Pods/Target\ Support\ Files/Pods-myproject/ExpoModulesProvider.swift (in target 'myproject' from project 'myproject')
EmitSwiftModule normal x86_64 (in target 'myproject' from project 'myproject')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'myproject' from project 'myproject')
(4 failures)
info Run CLI with --verbose flag for more details.
Note that some words may be changed due to privacy concerns. These are my configs:
// app.json
{
"expo": {
"name": "myproject",
"slug": "myproject",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.myproject.app"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.myproject.app"
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config')
module.exports = (async () => {
const config = await getDefaultConfig(__dirname)
const { transformer, resolver } = config
config.transformer = {
...transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer')
}
config.resolver = {
...resolver,
assetExts: resolver.assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...resolver.sourceExts, 'svg', 'cjs', 'mjs']
}
return config
})()
//package.json
{
"scripts": {
"start": "expo start --dev-client",
"dev": "expo start && i",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#apollo/client": "^3.4.7",
"#mdi/js": "^6.5.95",
"#ptomasroos/react-native-multi-slider": "^2.2.2",
"#react-native-async-storage/async-storage": "~1.15.0",
"#react-native-community/datetimepicker": "4.0.0",
"#react-native-community/masked-view": "^0.1.11",
"#react-native-picker/picker": "2.2.1",
"#react-navigation/bottom-tabs": "^5.11.11",
"#react-navigation/native": "^5.9.4",
"#react-navigation/stack": "^5.14.5",
"#urql/core": "^2.4.3",
"#urql/exchange-retry": "^0.3.2",
"axios": "^0.21.1",
"babel-loader": "^8.2.3",
"eas-cli": "^0.47.0",
"expo": "^44.0.0",
"expo-app-loading": "~1.3.0",
"expo-cli": "^5.1.2",
"expo-dev-client": "~0.8.4",
"expo-font": "~10.0.4",
"expo-google-app-auth": "~8.3.0",
"expo-google-sign-in": "~10.1.0",
"expo-linear-gradient": "~11.0.3",
"expo-localization": "~12.0.0",
"expo-secure-store": "~11.1.0",
"expo-sharing": "~10.1.0",
"expo-splash-screen": "~0.14.1",
"expo-status-bar": "~1.2.0",
"expo-updates": "~0.11.6",
"graphql": "^15.5.1",
"i18next": "^20.2.2",
"iterall": "^1.3.0",
"moment": "^2.29.1",
"prop-types": "^15.7.2",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-i18next": "^11.8.15",
"react-native": "0.64.3",
"react-native-action-button": "^2.8.5",
"react-native-animatable": "^1.3.3",
"react-native-appearance": "~0.3.3",
"react-native-breadcrumb": "^1.2.0",
"react-native-breadcrumb-navigation": "^1.0.4",
"react-native-calendars": "^1.1264.0",
"react-native-camera": "^3.43.8",
"react-native-chart-kit": "^6.11.0",
"react-native-draggable": "^3.3.0",
"react-native-dropdown-picker": "^5.3.0",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "~2.1.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^2.2.0",
"react-native-maps": "0.29.4",
"react-native-modal": "^11.10.0",
"react-native-modal-datetime-picker": "^9.2.3",
"react-native-pager-view": "5.4.9",
"react-native-reanimated": "~2.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "12.1.1",
"react-native-svg-transformer": "^1.0.0",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.0.1",
"react-native-touchable-scale": "^2.1.2",
"react-native-vector-icons": "^9.0.0",
"react-native-web": "0.17.1",
"react-redux": "^7.2.4",
"redux": "^4.1.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"rn-placeholder": "^3.0.3",
"rn-range-slider": "^2.0.4",
"subscriptions-transport-ws": "^0.11.0",
"url": "^0.11.0"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/react-native": "~0.64.12",
"typescript": "~4.3.5"
},
"private": true,
"name": "source-expo",
"version": "1.0.0"
}
// react-native info
System:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Pro
Memory: 120.25 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Watchman: 2022.03.14.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
//expo doctor
🎉 Didn't find any issues with the project!
//Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require File.join(File.dirname(`node --print "require.resolve('#react-native-community/cli-platform-ios/package.json')"`), "native_modules")
platform :ios, '12.0'
require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
target 'myproject' do
use_expo_modules!
config = use_native_modules!
pod 'expo-dev-launcher', path: '../node_modules/expo-dev-launcher', :configurations => :debug
pod 'expo-dev-menu', path: '../node_modules/expo-dev-menu', :configurations => :debug
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
)
# Uncomment to opt-in to using Flipper
#
# if !ENV['CI']
# use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.3', 'Flipper-RSocket' => '1.3.1')
# end
post_install do |installer|
react_native_post_install(installer)
# Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64
# Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933
installer.pods_project.targets.each do |target|
if (target.name&.eql?('FBReactNativeSpec'))
target.build_phases.each do |build_phase|
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
target.build_phases.move(build_phase, 0)
end
end
end
end
end
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
end
npx create-nuxt-app client and set it up. Run npm run dev and everything works.
I start auth setup with npm install #nuxtjs/auth
add '#nuxtjs/auth' module in nuxt.config.js
add example auth strategy like so
auth: {
strategies: {
local: {
endpoints: {
login: { url: '/api/login', method: 'post' },
},
tokenRequired: false,
tokenType: false
}
}
},
Add the example vue store and save it in store/index.js:
export const state = () => ({
counter: 0
})
export const mutations = {
increment(state) {
state.counter++
}
}
I run npm run dev, everything compiles and init message shows to go to http://localhost:3000/. Trying to load it in the browser, the URL continues to load after initial loading and does not end. Node process starts to use 100% of the CPU and after several minutes prints this and quits:
<--- Last few GCs --->
[34438:0x38ef0c0] 323677 ms: Scavenge 2003.9 (2048.6) -> 2003.2 (2049.1) MB, 10.9 / 0.0 ms (average mu = 0.209, current mu = 0.192) allocation failure
[34438:0x38ef0c0] 323728 ms: Scavenge 2004.6 (2049.6) -> 2004.0 (2049.9) MB, 12.4 / 0.0 ms (average mu = 0.209, current mu = 0.192) allocation failure
[34438:0x38ef0c0] 323778 ms: Scavenge 2005.4 (2050.4) -> 2004.8 (2050.6) MB, 10.9 / 0.0 ms (average mu = 0.209, current mu = 0.192) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x13cf019]
Security context: 0x29f654d808d1 <JSObject>
1: inspect(aka inspect) [0x32d8b34ca9f9] [internal/util/inspect.js:~240] [pc=0xee1e7f4f44c](this=0x1cbf81fc04b1 <undefined>,0x29f654d98bc1 <JSFunction Boolean (sfi = 0x3f35983d3769)>,0x02b5724d8a71 <Object map = 0x1bc8fcdd6919>)
2: /* anonymous */ [0x9a2eaaec139] [/home/myUserName/Documents/projectFile/client/node_modules/esm/esm.js:~1] [pc=0xee1e7e6e063](...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa093f0 node::Abort() [node]
2: 0xa097fc node::OnFatalError(char const*, char const*) [node]
3: 0xb842ae v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb84629 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xd30fe5 [node]
6: 0xd31676 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
7: 0xd3def5 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xd3eda5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xd4185c v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xd0830b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x1049f4e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x13cf019 [node]
Aborted
I tried this start to finish with node v10.15.3 and v12.18.3, the same result. Versions from package.json:
"dependencies": {
"#nuxtjs/auth": "^4.9.1",
"#nuxtjs/axios": "^5.12.0",
"bootstrap": "^4.5.0",
"bootstrap-vue": "^2.15.0",
"nuxt": "^2.14.0"
}
and npx create-nuxt-app --version shows create-nuxt-app/3.2.0 linux-x64 node-v12.18.3. OS is Solus 4.1 Fortitude.
What is going wrong here? If this is a known bug, are there versions/workaround that works?
Setting baseURL property under for axios in nuxt.config.js solved my issue:
axios: {
baseURL: '/'
}
This is first time i deploy to heroku. The deployment itself was successful but when i open app i get an error.
Looks like a problem resides inside package.json or Procfile.
The fixing maybe obvious for you guys but i am new to heroku so don't come angry.
[EDIT] I have disabled production mode by running heroku config:set NPM_CONFIG_PRODUCTION=false but error still remains just logs has been changed
Thanks in advance for you help guys!
Details below:
app - https://evening-retreat-75182.herokuapp.com
github repo - https://github.com/dagman/Recipebook
Procfile
web: npm run start:production
package.json
{
"name": "Recipebook",
"version": "1.0.0",
"description": "The most kickass app for your cooking recipes",
"main": "index.js",
"engines": {
"node": ">=5.0 <7",
"npm": ">=3.0 <4"
},
"repository": {
"type": "git",
"url": "https://github.com/dagman/Recipebook.git"
},
"keywords": [
"recipe",
"recipes",
"recipebook"
],
"author": "Islam Ibakaev <islamibakaev#gmail.com> (https://github.com/dagman)",
"license": "MIT",
"bugs": {
"url": "https://github.com/dagman/Recipebook/issues"
},
"homepage": "https://github.com/dagman/Recipebook",
"scripts": {
"start": "better-npm-run start",
"start:production": "npm run build && npm run start:prod",
"start:prod": "better-npm-run start:prod",
"build": "npm run clean:build && better-npm-run build",
"lint": "npm run lint:js && npm run lint:style",
"lint:js": "better-npm-run lint:js",
"lint:style": "better-npm-run lint:style",
"test": "better-npm-run test",
"test:watch": "npm test -- --no-single-run",
"clean:all": "npm run clean:build && npm run clean:coverage",
"clean:build": "better-npm-run clean:build",
"clean:coverage": "better-npm-run clean:coverage",
"coveralls": "better-npm-run coveralls && npm run test:clean"
},
"betterScripts": {
"start": {
"command": "nodemon ./index.js",
"env": {
"NODE_PATH": "./src",
"NODE_ENV": "development",
"PORT": "3000"
}
},
"start:prod": {
"command": "node ./index.js",
"env": {
"NODE_PATH": "./src",
"NODE_ENV": "production",
"PORT": "8080"
}
},
"build": {
"command": "webpack --progress --display-error-details --config ./tools/webpack/config.babel",
"env": {
"NODE_ENV": "production",
"BABEL_ENV": "es"
}
},
"lint:js": {
"command": "eslint -c .eslintrc ./src ./tools ./index.js"
},
"lint:style": {
"command": "stylelint \"./src/**/*.css\""
},
"test": {
"command": "karma start ./tools/testing/karma.conf.js --single-run",
"env": {
"NODE_ENV": "test"
}
},
"clean:build": {
"command": "rimraf ./public/dist"
},
"clean:coverage": {
"command": "rimraf ./coverage"
},
"coveralls": {
"command": "cat ./coverage/lcov/lcov.info | coveralls"
}
},
"dependencies": {
"autoprefixer": "^6.5.0",
"axios": "^0.14.0",
"babel-core": "^6.16.0",
"babel-polyfill": "^6.16.0",
"babel-runtime": "^6.11.6",
"chalk": "^1.1.3",
"classnames": "^2.2.5",
"compression": "^1.6.2",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^2.0.0-beta.3",
"flexboxgrid": "^6.3.1",
"helmet": "^2.3.0",
"hpp": "^0.2.1",
"immutable": "^3.8.1",
"material-ui": "^0.16.0",
"morgan": "^1.7.0",
"opn": "^4.0.2",
"radium": "^0.18.1",
"react": "^15.3.2",
"react-addons-shallow-compare": "^15.3.2",
"react-css-modules": "^3.7.10",
"react-dom": "^15.3.2",
"react-flexbox-grid": "^0.10.2",
"react-helmet": "^3.1.0",
"react-immutable-proptypes": "^2.1.0",
"react-redux": "^4.4.5",
"react-responsive": "^1.1.5",
"react-router": "^2.8.1",
"react-router-redux": "^4.0.6",
"react-tap-event-plugin": "^1.0.0",
"redbox-react": "^1.3.1",
"redux": "^3.6.0",
"redux-immutable": "^3.0.8",
"redux-logger": "^2.7.0",
"redux-thunk": "^2.1.0",
"serialize-javascript": "^1.3.0",
"serve-favicon": "^2.3.0",
"stylelint-webpack-plugin": "^0.4.0",
"webpack": "^2.1.0-beta.25",
"webpack-dev-middleware": "^1.8.3",
"webpack-hot-middleware": "^2.12.2",
"webpack-isomorphic-tools": "^2.5.8"
},
"devDependencies": {
"assets-webpack-plugin": "^3.4.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^6.2.5",
"babel-plugin-istanbul": "^2.0.1",
"babel-plugin-system-import-transformer": "^2.4.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"better-npm-run": "0.0.11",
"chai": "^3.5.0",
"chai-enzyme": "^0.5.2",
"coveralls": "^2.11.14",
"css-loader": "^0.25.0",
"enzyme": "^2.4.1",
"eslint": "^3.7.0",
"eslint-config-airbnb": "^12.0.0",
"eslint-loader": "^1.5.0",
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-jsx-a11y": "^2.2.2",
"eslint-plugin-react": "^6.3.0",
"file-loader": "^0.9.0",
"image-webpack-loader": "^2.0.0",
"imports-loader": "^0.6.5",
"json-loader": "^0.5.4",
"karma": "^1.3.0",
"karma-cli": "^1.0.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-mocha-reporter": "^2.2.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"mocha": "^3.1.0",
"node-sass": "^3.10.1",
"nodemon": "^1.10.2",
"null-loader": "^0.1.1",
"phantomjs": "^2.1.7",
"postcss": "^5.2.4",
"postcss-loader": "^0.13.0",
"react-addons-test-utils": "^15.3.2",
"react-hot-loader": "^3.0.0-beta.5",
"redux-mock-store": "^1.2.1",
"rimraf": "^2.5.4",
"sass-loader": "^4.0.2",
"sinon": "^2.0.0-pre.2",
"style-loader": "^0.13.1",
"stylelint": "^7.3.1",
"stylelint-config-standard": "^13.0.2",
"url-loader": "^0.5.7"
}
}
[EDIT] heroku logs
Hash: f14d96e1104722075ee5
2016-10-29T19:33:52.794597+00:00 app[web.1]: Version: webpack 2.1.0-beta.25
2016-10-29T19:33:52.794598+00:00 app[web.1]: Time: 36390ms
2016-10-29T19:33:52.794599+00:00 app[web.1]: Asset Size Chunks Chunk Names
2016-10-29T19:33:52.794600+00:00 app[web.1]: app.437ada71305f4f7f06fa.js 273 kB 0 [emitted] app
2016-10-29T19:33:52.794602+00:00 app[web.1]: app.437ada71305f4f7f06fa.css.map 34 kB 0 [emitted] app
2016-10-29T19:33 54% building modules 459/619 modules 160 active ...abel-runtime/core-js/object/assign.js
2016-10-29T19:33:52.794582+00:00 app[ 67% building modules 608/640 modules 32 active ...e-js/modules/_array-species-create.js
66% building modules 800/846 modules 46 active ...ixer/lib/static/plugins/transitint.js
2016-10-29 64% building modules 566/625 modules 59 active ...index.js!/app/src/theme/normalize.css
65% building modules 706/769 modules 63 active ...dules/core-js/library/modules/_has.js
66% building modules 691/728 modules 37 active /app/node_modules/fbjs/lib/isTextNode.js
66% building modules 828/875 modules 47 active ...react-addons-create-fragment/index.js
2016-10-29T19:33:52.794604+00:00 app[web.1]: + 977 hidden modules
2016-10-29T19:33:52.794605+00:00 app[web.1]: + 2 hidden modules
2016-10-29T19:33:52.794606+00:00 app[web.1]: Child extract-text-webpack-plugin:
2016-10-29T19:33:52.794607+00:00 app[web.1]: + 2 hidden modules
2016-10-29T19:33:52.794608+00:00 app[web.1]: Child extract-text-webpack-plugin:
2016-10-29T19:33:52.794608+00:00 app[web.1]: + 2 hidden modules
68% building modules 872/888 modules 16 active ...materier/lib/utils/isPrefixedValue.js
2016-10-29T19:33:52.794603+00:00 app[web.1]: [917] multi vendor 208 bytes {1} [built]
2016-10-29T19:33:52.794605+00:00 app[web.1]: Child extract-text-webpack-plugin:
65% building modules 657/705 modules 48 active ...ct-flexbox-grid/lib/components/Col.js
2016-10- 66% building modules 768/821 modules 53 active ...refixer/lib/utils/unprefixProperty.js
69% building modules 905/912 modules 8 active .../core-js/library/modules/_to-index.js
2016-10-29T19:33:52.794600+00:00 app[web.1]: vendor.9d66707b3af690baefd1.js 410 kB 1 [emitted] vendor
2016-10-29T19:33:52.794601+00:00 app[web.1]: app.437ada71305f4f7f06fa.css 25 kB 0 [emitted] app
2016-10-29T19:33:54.415735+00:00 app[web.1]:
2016-10-29T19:33:54.415747+00:00 app[web.1]: > Recipebook#1.0.0 start:prod /app
2016-10-29T19:33:54.415748+00:00 app[web.1]: > better-npm-run start:prod
2016-10-29T19:33:54.415749+00:00 app[web.1]:
2016-10-29T19:33:54.513444+00:00 app[web.1]: running better-npm-run in /app
2016-10-29T19:33:54.530984+00:00 app[web.1]: Executing script: start:prod
2016-10-29T19:33:54.535357+00:00 app[web.1]: to be executed: node ./index.js
2016-10-29T19:33:54.530987+00:00 app[web.1]:
2016-10-29T19:34:00.400261+00:00 app[web.1]: ==> � Listening at http://localhost:8080
2016-10-29T19:34:08.828406+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-10-29T19:34:08.828500+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-10-29T19:34:08.920786+00:00 heroku[web.1]: State changed from starting to crashed
2016-10-29T19:34:08.921680+00:00 heroku[web.1]: State changed from crashed to starting
2016-10-29T19:34:08.936050+00:00 heroku[web.1]: Process exited with status 137
2016-10-29T19:34:18.932898+00:00 heroku[web.1]: Starting process with command `npm run start:production`
2016-10-29T19:34:23.973344+00:00 app[web.1]:
2016-10-29T19:34:23.973368+00:00 app[web.1]: > Recipebook#1.0.0 start:production /app
2016-10-29T19:34:23.973369+00:00 app[web.1]: > npm run build && npm run start:prod
2016-10-29T19:34:23.973369+00:00 app[web.1]:
2016-10-29T19:34:27.052893+00:00 app[web.1]:
2016-10-29T19:34:27.052904+00:00 app[web.1]: > Recipebook#1.0.0 build /app
2016-10-29T19:34:27.052905+00:00 app[web.1]: > npm run clean:build && better-npm-run build
2016-10-29T19:34:27.052906+00:00 app[web.1]:
2016-10-29T19:34:29.508764+00:00 app[web.1]:
2016-10-29T19:34:29.508780+00:00 app[web.1]: > Recipebook#1.0.0 clean:build /app
2016-10-29T19:34:29.508781+00:00 app[web.1]: > better-npm-run clean:build
2016-10-29T19:34:29.508782+00:00 app[web.1]:
2016-10-29T19:34:29.771274+00:00 app[web.1]: running better-npm-run in /app
2016-10-29T19:34:29.791323+00:00 app[web.1]: Executing script: clean:build
2016-10-29T19:34:29.791326+00:00 app[web.1]:
2016-10-29T19:34:29.797335+00:00 app[web.1]: to be executed: rimraf ./public/dist
2016-10-29T19:34:30.876988+00:00 app[web.1]: running better-npm-run in /app
2016-10-29T19:34:31.135328+00:00 app[web.1]: Executing script: build
2016-10-29T19:34:31.135338+00:00 app[web.1]:
2016-10-29T19:34:31.175397+00:00 app[web.1]: to be executed: webpack --progress --display-error-details --config ./tools/webpack/config.babel
2016-10-29T19:35:19.343215+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-10-29T19:35:19.343215+00:00 heroku[web.1]: Stopping process with SIGKILL
12% building modules 18/41 modules 23 active ...e_modules/react-router/lib/History.js
15% building modules 49/68 modules 19 active ...odules/regenerator-runtime/runtime.js
2016-10-29T19 17% building modules 64/111 modules 47 active ...e_modules/axios/lib/helpers/spread.js
2016-10-29T19:35:19.401700+00:00 22% building modules 108/125 modules 17 active ...de_modules/lodash-es/isPlainObject.js
2016-10-29T19:35:19.40170 24% building modules 124/390 modules 266 active ...s/core-js/library/fn/set-immediate.js
2016-10-29T19:35:19.401700+00: 29% building modules 165/406 modules 241 active ...ules/babel-runtime/helpers/extends.js
43% building modules 277/406 modules 129 active ...ules/babel-runtime/helpers/extends.js
22% building modules 108/181 modules 73 active ...les/core-js/modules/es6.math.log1p.js
56% building modules 384/412 modules 28 active ...ode_modules/lodash-es/isObjectLike.js
2016-10-29T19:35:19.40170 56% building modules 390/463 modules 73 active ...e_modules/core-js/modules/_classof.js
2016-10-29T19:35:19.401 22% building modules 108/238 modules 130 active ...s/core-js/modules/es6.regexp.match.js
2016-10-29T19:35:19.401700+00: 64% building modules 566/625 modules 59 active .../index.js!/app/src/constants/index.js
64% building modules 619/686 modules 67 active ...s/library/modules/web.dom.iterable.js
49% building modules 331/409 modules 78 active ...e_modules/react/lib/EventPluginHub.js
2016-10-29T19:35:19.401700+00:00 54% building modules 390/520 modules 130 active ..._modules/core-js/moes/_iter-create.js
36% building modules 221/406 modules 185 active ...ules/babel-runtime/helpers/extends.js
49% building modules 408/614 modules 206 active ...ules/core-js/library/modules/_core.js
23% building modules 113/345 modules 232 active ...odules/react/lib/ReactCurrentOwner.js
52% building modules 401/565 modules 164 active .../react/lib/ReactCompositeComponent.js
2016-10-29T19:35:19.401700+00:00 64% building modules 730/802 modules 72 active /app/node_modules/simple-assign/index.js
2016-10-29T19:35:19.4 66% building modules 607/641 modules 34 active ...node_modules/core-js/modules/_path.js
54% building modules 460/618 modules 158 active ...abel-runtime/core-js/object/assign.js
2016-10-29T19:35:19.401700+0 60% building modules 516/618 modules 102 active ...abel-runtime/core-js/object/assign.js
22% building modules 108/294 modules 186 active ...les/core-js/modules/es7.math.imulh.js
2016-10-29T19:35 65% building modules 707/768 modules 61 active ...odules/axios/lib/core/enhanceError.js
66% building modules 768/821 modules 53 active ...refixer/lib/utils/unprefixProperty.js
66% building modules 690/728 modules 38 active /app/node_modules/fbjs/lib/isTextNode.js
65% building modules 657/705 modules 48 active ...ct-flexbox-grid/lib/components/Col.js
2016-10-29T19:35 66% building modules 800/846 modules 46 active ...ixer/lib/static/plugins/transition.js
66% building modules 828/875 modules 47 active ...react-addons-create-fragment/index.js
68% building modules 869/887 modules 18 active ...prefixer/lib/utils/isPrefixedValue.jsError waiting for process to terminate: No child processes
2016-10-29T19:35:19.532075+00:00 heroku[web.1]: Process exited with status 22
2016-10-29T19:35:19.533651+00:00 heroku[web.1]: State changed from starting to crashed
2016-10-29T19:41:05.532116+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-retreat-75182.herokuapp.com request_id=f7e80c38-c84b-4f75-9478-59d782c1e112 fwd="207.244.90.77" dyno= connect= service= status=503 bytes=
2016-10-29T19:41:09.449918+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-retreat-75182.herokuapp.com request_id=93c05f33-7ec5-4b5f-8409-f218c159a020 fwd="207.244.90.77" dyno= connect= service= status=503 bytes=
2016-10-29T19:41:15.280404+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-retreat-75182.herokuapp.com request_id=3b8fd867-6383-4a6a-bf01-b3e379f05225 fwd="207.244.90.77" dyno= connect= service= status=503 bytes=
2016-10-29T19:41:16.426158+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-retreat-75182.herokuapp.com request_id=1dd69267-6fcc-4ab4-ad0e-00a985606a18 fwd="207.244.90.77" dyno= connect= service= status=503 bytes=
The problem is you cannot use better-npm-run directly in the CLI.
You need to use shell-exec and specify the command.
Check the official documentation: https://www.npmjs.com/package/better-npm-run#cli-commands
[EDIT]
Move better-npm-run to dependencies or make heroku to install devDependencies
Refer: https://devcenter.heroku.com/articles/nodejs-support#devdependencies
Heroku binds the port number dynamically so you need to use process.env.PORT to get the dynamically allocated port. Something similar to this.
Hope this helps!