我必须创建一个文档才能看到我的反应页面显示在github页面上。我使用h-pages deploy并在尝试更新gh-pages时不断收到此错误。
我唯一可以访问的分支是* master。
我在做:
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
这是错误:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rReduxTable@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rReduxTable@0.1.0 build 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! /Users/marianaperez/.npm/_logs/2018-03-12T19_02_15_196Z-debug.log
答案 0 :(得分:0)
这是我的json包
{
"name": "rReduxTable",
"version": "0.1.0",
"private": true,
"devDependencies": {
"gh-pages": "^1.1.0",
"husky": "^0.14.3",
"lint-staged": "^7.0.0",
"prettier": "^1.11.0",
"react-scripts": "^1.0.17"
},
"dependencies": {
"debug": "^3.1.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "next",
"react-sortable-table": "^1.3.0",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"sanitize.css": "^5.0.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"precommit": "lint-staged",
"predeploy": "npm run build",
"deploy": "gh-pages -b master -d build"
},
"homepage": "https://marianapt.github.io/reduxTable/",
"lint-staged": {
"*.{js,json,css,md}": [
"prettier --write",
"git add"
]
}
}