Я пытаюсь создать простое электронное приложение для windows с реагировать. js. Все было хорошо, неожиданно я столкнулся с некоторой ошибкой, которая не позволяет мне запустить приложение:
Ошибка: https://pastebin.com/awMi4UBM (react-scripts start
)
Ошибка: https://pastebin.com/xeH3A1Dx (rescripts start
)
Мой package.json
частично:
....
"scripts": {
"start": "rescripts start",
"startb": "react-scripts start",
"build": "rescripts build",
"test": "rescripts test",
"eject": "react-scripts eject",
"postinstall": "electron-builder install-app-deps",
"preelectron-pack": "yarn build",
"electron-pack": "electron-builder build -mw",
"electron-dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\""
},
...
Вставлено здесь также:
ошибка для react-scripts start
:
yarn run v1.17.3
$ react-scripts start
i 「wds」: Project is running at http://0.0.0.0:3000/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from E:\gits\telapoka-dev\telapoka-react\public
i 「wds」: 404s will fallback to /index.html
Starting the development server...
<--- Last few GCs --->
[2260:0000019DDCF58EB0] 134175 ms: Scavenge 1375.7 (1424.0) -> 1375.4 (1424.5) MB, 11.0 / 0.0 ms (average mu = 0.124, current mu = 0.023) allocation failure
[2260:0000019DDCF58EB0] 137527 ms: Mark-sweep 1376.1 (1424.5) -> 1375.8 (1424.5) MB, 3339.8 / 0.0 ms (average mu = 0.070, current mu = 0.014) allocation failure scavenge might not su
cceed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0000001B64F5C5C1]
1: StubFrame [pc: 0000001B64F4EC05]
Security context: 0x03045269e6e9 <JSObject>
2: replace [00000304526905E9](this=0x03b789806cc9 <String[80]: E:\gits\telapoka-dev\telapoka-react\node_modules\react-file-viewer\dist\index.js>,0x014e3ebde1c1 <JSRegExp <String[2]:
\\>>,0x014cc71b23e1 <String[1]: />)
3: _append [000001ED43DEE861] [E:\gits\telapoka-dev\telapoka-react\node_modules\@babel\gener...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF761E3C6AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
2: 00007FF761E17416 node::MakeCallback+4534
3: 00007FF761E17D90 node_module_register+2032
4: 00007FF76213189E v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7621317CF v8::internal::FatalProcessOutOfMemory+639
6: 00007FF762317F94 v8::internal::Heap::MaxHeapGrowingFactor+9620
7: 00007FF76230EF76 v8::internal::ScavengeJob::operator=+24550
8: 00007FF76230D5CC v8::internal::ScavengeJob::operator=+17980
9: 00007FF762316317 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF762316396 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF762440637 v8::internal::Factory::NewFillerObject+55
12: 00007FF7624BD826 v8::internal::operator<<+73494
13: 0000001B64F5C5C1
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Process finished with exit code 134
ошибка для rescripts start
:
yarn electron-dev
yarn run v1.17.3
$ concurrently "BROWSER=none yarn start" "wait-on http://localhost:3000 && electron ."
[0] 'BROWSER' is not recognized as an internal or external command,
[0] operable program or batch file.
[0] BROWSER=none yarn start exited with code 1
Зависимости:
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"axios": "^0.19.2",
"concurrently": "^5.1.0",
"copy-clipboard-js": "^1.0.3",
"dialog": "^0.3.1",
"electron-is-dev": "^1.1.0",
"fs": "^0.0.1-security",
"react": "^16.12.0",
"react-ace": "^8.0.0",
"react-awesome-button": "^6.5.1",
"react-collapsible": "^2.6.2",
"react-dom": "^16.12.0",
"react-file-viewer": "^1.2.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.3.0",
"react-welcome-page": "^0.2.1",
"remote": "^0.2.6",
"wait-on": "^4.0.0"
},
DevDependencies:
"devDependencies": {
"@rescripts/cli": "^0.0.13",
"@rescripts/rescript-env": "^0.0.11",
"electron": "^8.0.0",
"electron-builder": "^22.3.2",
"typescript": "^3.7.5"
},