Я пытался развернуть свое приложение реакции на страницах github. У меня есть такие проблемы:
Failed to get remote.origin.url (task must either be run in a git repository with a configured origin remote or must be configured with the "repo" option).
npm ERR! код ELIFECYCLE npm ОШИБКА! errno 1 npm ERR! react_app@0.1.0 развертывание: gh-pages -d build — repo https://baranacikgoz.github.io/Employee-Management-App
npm ОШИБКА! Статус выхода 1 npm ERR! npm ОШИБКА! Не удалось выполнить сценарий развертывания react_app@0.1.0. npm ERR! Это, вероятно, не проблема с npm. Вероятно, есть дополнительные выходные данные регистрации.
npm ERR! Полный журнал этого прогона можно найти в: npm ERR! /root/.npm/_logs/2020-04-10T11_21_26_577Z-debug.log
Вот мой вывод git remote -v:
Employee-Management-App https://github.com/baranacikgoz/Employee-Management-App.git (fetch)
Employee-Management-App https://github.com/baranacikgoz/Employee-Management-App.git (push)
И вот мой пакет. json файл:
"name": "react_app",
"homepage": "https://baranacikgoz.github.io/Employee-Management-App",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"axios": "^0.19.2",
"bootstrap": "^4.4.1",
"react": "^16.13.1",
"react-bootstrap": "^1.0.0",
"react-dom": "^16.13.1",
"react-pose": "^4.0.10",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"reactjs-popup": "^1.5.0",
"uniqid": "^5.2.0"
},
"scripts": {
"predeploy": "npm run build",
"deploy" : "gh-pages -d build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"gh-pages": "^2.2.0"
}
}
Наконец вот журнал ошибок:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'deploy' ]
2 info using npm@6.14.4
3 info using node@v10.17.0
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info lifecycle react_app@0.1.0~predeploy: react_app@0.1.0
6 verbose lifecycle react_app@0.1.0~predeploy: unsafe-perm in lifecycle true
7 verbose lifecycle react_app@0.1.0~predeploy: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/baran/Software/Completed Works/Employee-Management-App/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
8 verbose lifecycle react_app@0.1.0~predeploy: CWD: /home/baran/Software/Completed Works/Employee-Management-App
9 silly lifecycle react_app@0.1.0~predeploy: Args: [ '-c', 'npm run build' ]
10 silly lifecycle react_app@0.1.0~predeploy: Returned: code: 0 signal: null
11 info lifecycle react_app@0.1.0~deploy: react_app@0.1.0
12 verbose lifecycle react_app@0.1.0~deploy: unsafe-perm in lifecycle true
13 verbose lifecycle react_app@0.1.0~deploy: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/baran/Software/Completed Works/Employee-Management-App/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
14 verbose lifecycle react_app@0.1.0~deploy: CWD: /home/baran/Software/Completed Works/Employee-Management-App
15 silly lifecycle react_app@0.1.0~deploy: Args: [ '-c', 'gh-pages -d build' ]
16 silly lifecycle react_app@0.1.0~deploy: Returned: code: 1 signal: null
17 info lifecycle react_app@0.1.0~deploy: Failed to exec deploy script
18 verbose stack Error: react_app@0.1.0 deploy: `gh-pages -d build`
18 verbose stack Exit status 1
18 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
18 verbose stack at EventEmitter.emit (events.js:198:13)
18 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
18 verbose stack at ChildProcess.emit (events.js:198:13)
18 verbose stack at maybeClose (internal/child_process.js:982:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
19 verbose pkgid react_app@0.1.0
20 verbose cwd /home/baran/Software/Completed Works/Employee-Management-App
21 verbose Linux 5.4.0-4parrot1-amd64
22 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "deploy"
23 verbose node v10.17.0
24 verbose npm v6.14.4
25 error code ELIFECYCLE
26 error errno 1
27 error react_app@0.1.0 deploy: `gh-pages -d build`
27 error Exit status 1
28 error Failed at the react_app@0.1.0 deploy script.
28 error This is probably not a problem with npm. There is likely additional logging output above.
29 verbose exit [ 1, true ]