actjs - код ELIFECYCLE - errno 1 in heroku - PullRequest
0 голосов
/ 31 октября 2019

Я получаю приведенную ниже ошибку при попытке запустить приложение реагирования после развертывания в Heroku. но в локальном режиме я смог протестировать его, и он отлично работает.

2019-10-31T09:59:40.297427+00:00 heroku[web.1]: Starting process with command `npm start`
2019-10-31T09:59:39+00:00 app[api]: Build succeeded
2019-10-31T09:59:42.272718+00:00 app[web.1]: 
2019-10-31T09:59:42.272736+00:00 app[web.1]: > react_bill_ui@0.1.0 start /app
2019-10-31T09:59:42.272738+00:00 app[web.1]: > react-scripts start
2019-10-31T09:59:42.272739+00:00 app[web.1]: 
2019-10-31T09:59:44.496397+00:00 app[web.1]: Starting the development server...
2019-10-31T09:59:44.496433+00:00 app[web.1]: 
2019-10-31T09:59:45.011449+00:00 heroku[web.1]: State changed from starting to up
2019-10-31T10:00:17.13608+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=react-app-bill.herokuapp.com request_id=81976f20-f4a6-4a55-b688-2e6ddb6ef4df fwd="14.98.30.86" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2019-10-31T10:00:17.508736+00:00 app[web.1]: 
2019-10-31T10:00:17.508755+00:00 app[web.1]: <--- Last few GCs --->
2019-10-31T10:00:17.508758+00:00 app[web.1]: 
2019-10-31T10:00:17.508772+00:00 app[web.1]: [30:0x2c816e0]    34384 ms: Mark-sweep 250.7 (258.4) -> 250.4 (258.9) MB, 335.7 / 0.0 ms  (average mu = 0.120, current mu = 0.029) allocation failure scavenge might not succeed
2019-10-31T10:00:17.508774+00:00 app[web.1]: [30:0x2c816e0]    34776 ms: Mark-sweep 251.0 (258.9) -> 250.8 (258.9) MB, 382.1 / 0.0 ms  (average mu = 0.068, current mu = 0.026) allocation failure scavenge might not succeed
2019-10-31T10:00:17.508777+00:00 app[web.1]: 
2019-10-31T10:00:17.508778+00:00 app[web.1]: 
2019-10-31T10:00:17.508781+00:00 app[web.1]: <--- JS stacktrace --->
2019-10-31T10:00:17.508783+00:00 app[web.1]: 
2019-10-31T10:00:17.508786+00:00 app[web.1]: ==== JS stack trace =========================================
2019-10-31T10:00:17.508788+00:00 app[web.1]: 
2019-10-31T10:00:17.508791+00:00 app[web.1]: 0: ExitFrame [pc: 0x13725d9]
2019-10-31T10:00:17.508793+00:00 app[web.1]: Security context: 0x32ccca7008a1 <JSObject>
2019-10-31T10:00:17.508797+00:00 app[web.1]: 1: checkLVal [0x14daf89c3a21] [/app/node_modules/@babel/parser/lib/index.js:~8085] [pc=0x2d6438014a7a](this=0x005aca6932f1 <BaseParser map = 0x1edace5cf611>,0x0f020fb1ee31 <Node map = 0x1edace5cfde1>,5,0x0f020fb1f0f9 <Object map = 0x104e32142a51>,0x254d65462681 <String[#22]: function paramter list>)
2019-10-31T10:00:17.5088+00:00 app[web.1]: 2: checkParams [0x122749b32a59] [/app/node_modules/@babe...
2019-10-31T10:00:17.508801+00:00 app[web.1]: 
2019-10-31T10:00:17.508806+00:00 app[web.1]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
2019-10-31T10:00:17.509443+00:00 app[web.1]: 1: 0x9d8da0 node::Abort() [node]
2019-10-31T10:00:17.509882+00:00 app[web.1]: 2: 0x9d9f56 node::OnFatalError(char const*, char const*) [node]
2019-10-31T10:00:17.510367+00:00 app[web.1]: 3: 0xb37dbe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
2019-10-31T10:00:17.510893+00:00 app[web.1]: 4: 0xb38139 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
2019-10-31T10:00:17.511473+00:00 app[web.1]: 5: 0xce34f5  [node]
2019-10-31T10:00:17.512009+00:00 app[web.1]: 6: 0xce3b86 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
2019-10-31T10:00:17.512545+00:00 app[web.1]: 7: 0xcefa1a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
2019-10-31T10:00:17.513071+00:00 app[web.1]: 8: 0xcf0925 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
2019-10-31T10:00:17.513605+00:00 app[web.1]: 9: 0xcf3338 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
2019-10-31T10:00:17.514126+00:00 app[web.1]: 10: 0xcbee6e v8::internal::Factory::NewByteArray(int, v8::internal::AllocationType) [node]
2019-10-31T10:00:17.514687+00:00 app[web.1]: 11: 0xc2fc7d v8::internal::SourcePositionTableBuilder::ToSourcePositionTable(v8::internal::Isolate*) [node]
2019-10-31T10:00:17.515322+00:00 app[web.1]: 12: 0x197f2ca v8::internal::compiler::CodeGenerator::FinalizeCode() [node]
2019-10-31T10:00:17.51591+00:00 app[web.1]: 13: 0x19f8c8d v8::internal::compiler::PipelineImpl::FinalizeCode(bool) [node]
2019-10-31T10:00:17.516492+00:00 app[web.1]: 14: 0x19f9e40 v8::internal::compiler::PipelineCompilationJob::FinalizeJobImpl(v8::internal::Isolate*) [node]
2019-10-31T10:00:17.517003+00:00 app[web.1]: 15: 0xc0ef80 v8::internal::OptimizedCompilationJob::FinalizeJob(v8::internal::Isolate*) [node]
2019-10-31T10:00:17.517479+00:00 app[web.1]: 16: 0xc12823 v8::internal::Compiler::FinalizeOptimizedCompilationJob(v8::internal::OptimizedCompilationJob*, v8::internal::Isolate*) [node]
2019-10-31T10:00:17.517985+00:00 app[web.1]: 17: 0xc37f46 v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [node]
2019-10-31T10:00:17.518517+00:00 app[web.1]: 18: 0xca0e7c v8::internal::StackGuard::HandleInterrupts() [node]
2019-10-31T10:00:17.519138+00:00 app[web.1]: 19: 0xfef887 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [node]
2019-10-31T10:00:17.519806+00:00 app[web.1]: 20: 0x13725d9  [node]
2019-10-31T10:00:17.559501+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-10-31T10:00:17.559679+00:00 app[web.1]: npm ERR! errno 1
2019-10-31T10:00:17.560793+00:00 app[web.1]: npm ERR! react_bill_ui@0.1.0 start: `react-scripts start`
2019-10-31T10:00:17.560988+00:00 app[web.1]: npm ERR! Exit status 1
2019-10-31T10:00:17.561154+00:00 app[web.1]: npm ERR!
2019-10-31T10:00:17.561295+00:00 app[web.1]: npm ERR! Failed at the react_bill_ui@0.1.0 start script.
2019-10-31T10:00:17.561423+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-10-31T10:00:17.572398+00:00 app[web.1]: 
2019-10-31T10:00:17.572634+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-10-31T10:00:17.572841+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-10-31T10_00_17_562Z-debug.log
2019-10-31T10:00:17.656343+00:00 heroku[web.1]: State changed from up to crashed
2019-10-31T10:00:17.612032+00:00 heroku[web.1]: Process exited with status 1
2019-10-31T10:00:18.721253+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=react-app-bill.herokuapp.com request_id=f58a798a-fd5e-433b-a8bd-1c7c86191089 fwd="14.98.30.86" dyno= connect= service= status=503 bytes= protocol=https

ниже - мой пакет. json

{
  "name": "react_bill_ui",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@grapecity/spread-sheets-react": "^12.2.5",
    "body-parser": "^1.18.3",
    "express": "^4.16.4",
    "npm": "^6.11.3",
    "react": "^16.4.0",
    "react-bar-chart": "^0.1.2",
    "react-bootstrap": "^0.32.4",
    "react-data-table-component": "^3.5.0",
    "react-export-excel": "^0.5.3",
    "react-file-drop": "^0.2.8",
    "react-google-charts": "^3.0.15",
    "react-responsive-data-table": "^1.0.4",
    "react-router-dom": "^5.1.0",
    "react-scripts": "^3.2.0",
    "react-table": "^6.10.3",
    "semantic-ui-react": "^0.88.1",
    "styled-components": "^4.4.0",
    "bootstrap": "^4.3.1",
    "concurrently": "^4.0.1",
    "datatables.net": "^1.10.20",
    "jquery": "^3.4.1",
    "loader-utils": "^1.0.4",
    "popper.js": "^1.15.0"
  },
  "devDependencies": {
    "bootstrap": "^4.3.1",
    "concurrently": "^4.0.1",
    "datatables.net": "^1.10.20",
    "jquery": "^3.4.1",
    "loader-utils": "^1.0.4",
    "popper.js": "^1.15.0",

    "@grapecity/spread-sheets-react": "^12.2.5",
    "body-parser": "^1.18.3",
    "express": "^4.16.4",
    "npm": "^6.11.3",
    "react": "^16.4.0",
    "react-bar-chart": "^0.1.2",
    "react-bootstrap": "^0.32.4",
    "react-data-table-component": "^3.5.0",
    "react-export-excel": "^0.5.3",
    "react-file-drop": "^0.2.8",
    "react-google-charts": "^3.0.15",
    "react-responsive-data-table": "^1.0.4",
    "react-router-dom": "^5.1.0",
    "react-scripts": "^3.2.0",
    "react-table": "^6.10.3",
    "semantic-ui-react": "^0.88.1",
    "styled-components": "^4.4.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "webpacker": "node --max_old_space_size=4096 node_modules/.bin/webpack-dev-server --progress --color --config config/webpack/development.js",
     "heroku-prebuild": "export NPM_CONFIG_PRODUCTION=false; export NODE_ENV=; NPM_CONFIG_PRODUCTION=false NODE_ENV=development npm install --only=dev --dev",
    "heroku-postbuild": "export NPM_CONFIG_PRODUCTION=true; export NODE_ENV=production;"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Я проверил StackOverFlow и пару GitDocs,и у других были подобные проблемы с файловой структурой и пост-сборкой для других приложений, но некоторые из этих решений (вращались вокруг перехода на heroku из другой ветки) не были для меня плодотворными.

Также явозможность создавать его локально без каких-либо ошибок.

Любая помощь приветствуется, поэтому я могу завершить этот проект.

Спасибо

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...