我尝试将我的反应应用部署到 heroku ,但在部署时不断遇到此问题请任何人都可以帮我解决这个问题。
的package.json:
{
"name": "todo_task",
"version": "0.1.0",
"private": true,
"dependencies": {
"ansi-regex": "^3.0.0",
"antd": "^3.2.3",
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
"chalk": "^2.3.2",
"chokidar": "^2.0.2",
"expand-range": "^2.0.1",
"filename-regex": "^2.0.1",
"for-own": "^1.0.0",
"glob": "^7.1.2",
"graceful-fs": "^4.1.11",
"has-ansi": "^3.0.0",
"history": "^4.7.2",
"inherits": "^2.0.3",
"is-binary-path": "^2.0.0",
"is-buffer": "^2.0.2",
"is-extendable": "^1.0.1",
"is-extglob": "^2.1.1",
"is-glob": "^4.0.0",
"is-posix-bracket": "^0.1.1",
"json5": "^1.0.1",
"lodash": "^4.17.5",
"mkdirp": "^0.5.1",
"moment": "^2.21.0",
"object-assign": "^4.1.1",
"object.omit": "^3.0.0",
"os-tmpdir": "^1.0.2",
"parse-glob": "^3.0.4",
"path-is-absolute": "^1.0.1",
"preserve": "^0.2.0",
"randomatic": "^3.0.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-redux": "^5.0.7",
"react-router-dom": "^4.2.2",
"react-router-redux": "^5.0.0-alpha.9",
"react-scripts": "1.1.1",
"readdirp": "^2.1.0",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
"regex-cache": "^0.4.4",
"source-map": "^0.7.2",
"strip-ansi": "^4.0.0",
"underscore": "^1.8.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"engines": {
"node": "v8.0.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-polyfill": "^6.26.0"
}
}
答案 0 :(得分:0)
我不确定我是否可以在path-to-regexp
中看到package.json
,这似乎是heroku抱怨的内容。在项目目录中,从终端运行:
npm install path-to-regexp --save
之后你可以再次推送到heroku。这应该可以解决你的问题。