在heroku上反应应用程序无法启动

时间:2017-05-04 13:53:33

标签: javascript node.js reactjs heroku redux

我有一个应用程序正常使用localhost,但它没有在我的heruko实例中启动。 这是我的package.json文件:

{
  "name": "innova-client",
  "scripts": {
    "build": "webpack --config build/webpack.development.js",
    "watch-build": "webpack --progress --watch --config build/webpack.development.js",
    "start": "webpack-dev-server --config build/webpack.standalone.js",
    "test": "jest"
  },
  "jest": {
    "transform": {
      ".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
    },
    "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js"
    ]
  },
  "devDependencies": {
    "@types/enzyme": "^2.7.5",
    "@types/jest": "^18.1.1",
    "@types/jquery": "^2.0.40",
    "@types/lodash": "^4.14.54",
    "@types/react": "^15.0.14",
    "@types/react-addons-test-utils": "^0.14.17",
    "@types/react-dom": "^0.14.23",
    "@types/react-redux": "^4.4.37",
    "@types/react-router": "^3.0.6",
    "@types/react-router-redux": "^4.0.42",
    "@types/react-test-renderer": "^15.4.2",
    "@types/redux-logger": "^2.6.34",
    "@types/redux-persist": "^4.0.0",
    "awesome-typescript-loader": "^3.1.2",
    "babel-jest": "^19.0.0",
    "enzyme": "^2.7.1",
    "jest": "^19.0.2",
    "jest-cli": "^19.0.2",
    "react-addons-test-utils": "^15.4.2",
    "react-test-renderer": "^15.4.2",
    "source-map-loader": "^0.1.6",
    "ts-jest": "^19.0.0",
    "webpack": "^1.9.1",
    "webpack-dev-server": "^1.14.1"
  },
  "dependencies": {
    "axios": "^0.15.3",
    "jquery": "^3.1.1",
    "lodash": "^4.17.4",
    "react": "^15.4.2",
    "react-dom": "^15.4.2",
    "react-redux": "^5.0.3",
    "react-router": "^3.0.2",
    "react-router-redux": "^4.0.8",
    "redux": "^3.6.0",
    "redux-logger": "^2.8.2",
    "redux-persist": "^4.3.1",
    "redux-thunk": "^2.2.0",
    "typescript": "^2.2.1"
  }
}

以下是webpack.development.js的代码:

module.exports = {
    entry: [
        './src/index.tsx'
    ],

    output: {
        filename: '../webapp/public/javascripts/app.js',
    },

    devtool: 'inline-source-map',

    resolve: {
        extensions: ['', '.js', '.ts', '.tsx']
    },

    module: {
        loaders: [
            // All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'.
            {test: /\.tsx?$/, loader: 'awesome-typescript-loader'}
        ],

        preLoaders: [
            // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
            {test: /\.js$/, loader: 'source-map-loader'}
        ]
    }
};

还有webpack.standalone.js的代码:

module.exports = {
    entry: './src/index.tsx',

    output: {
        path: 'public',
        filename: 'bundle.js',
        publicPath: '/'
    },

    devtool: 'inline-source-map',

    resolve: {
        extensions: ['', '.js', '.ts', '.tsx']
    },

    module: {
        loaders: [
            // All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'.
            {test: /\.tsx?$/, loader: 'awesome-typescript-loader'}
        ],

        preLoaders: [
            // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
            {test: /\.js$/, loader: 'source-map-loader'}
        ]
    },

    devServer: {
        inline: true,
        historyApiFallback: true,
        contentBase: 'public/',
        port: 3000
    }
};

我可以运行npm install然后运行npm start。我的应用程序开始正常。

现在我想在heroku上部署我的应用程序,所以我创建了一个git存储库,我忽略了“node_modules”目录。 当转到Heroku生成的URL时,我收到消息“应用程序中发生错误,无法提供您的页面。如果您是应用程序所有者,请检查日志以获取详细信息。”

输入heroku logs时,我收到了以下消息:

2017-05-04T13:47:58.888875+00:00 app[api]: Release v2 created by user innova-rd@cat-amania.com
2017-05-04T13:47:58.723117+00:00 app[api]: Release v1 created by user innova-rd@cat-amania.com
2017-05-04T13:47:58.723117+00:00 app[api]: Initial release by user innova-rd@cat-amania.com
2017-05-04T13:47:58.888875+00:00 app[api]: Enable Logplex by user innova-rd@cat-amania.com
2017-05-04T13:51:14.000000+00:00 app[api]: Build started by user innova-rd@cat-amania.com
2017-05-04T13:51:33.237737+00:00 app[api]: Scaled to web@1:Free by user innova-rd@cat-amania.com
2017-05-04T13:51:33.212441+00:00 app[api]: Deploy 30333e7 by user innova-rd@cat-amania.com
2017-05-04T13:51:33.212441+00:00 app[api]: Release v3 created by user innova-rd@cat-amania.com
2017-05-04T13:51:14.000000+00:00 app[api]: Build succeeded
2017-05-04T13:51:36.718804+00:00 heroku[web.1]: Starting process with command `npm start`
2017-05-04T13:51:41.387022+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-04T13:51:41.387904+00:00 heroku[web.1]: State changed from crashed to starting
2017-05-04T13:51:41.372895+00:00 heroku[web.1]: Process exited with status 1
2017-05-04T13:51:41.246395+00:00 app[web.1]:
2017-05-04T13:51:41.246409+00:00 app[web.1]: > innova-client@ start /app
2017-05-04T13:51:41.246410+00:00 app[web.1]: > webpack-dev-server --config build/webpack.standalone.js
2017-05-04T13:51:41.246410+00:00 app[web.1]:
2017-05-04T13:51:41.254190+00:00 app[web.1]: sh: 1: webpack-dev-server: not found
2017-05-04T13:51:41.260595+00:00 app[web.1]:
2017-05-04T13:51:41.271775+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-generic
2017-05-04T13:51:41.272071+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-05-04T13:51:41.272273+00:00 app[web.1]: npm ERR! node v6.10.3
2017-05-04T13:51:41.272429+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-05-04T13:51:41.272604+00:00 app[web.1]: npm ERR! file sh
2017-05-04T13:51:41.272791+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-05-04T13:51:41.272960+00:00 app[web.1]: npm ERR! errno ENOENT
2017-05-04T13:51:41.273140+00:00 app[web.1]: npm ERR! syscall spawn
2017-05-04T13:51:41.273296+00:00 app[web.1]: npm ERR! innova-client@ start: `webpack-dev-server --config build/webpack.standalone.js`
2017-05-04T13:51:41.273666+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-05-04T13:51:41.273848+00:00 app[web.1]: npm ERR!
2017-05-04T13:51:41.274051+00:00 app[web.1]: npm ERR! Failed at the innova-client@ start script 'webpack-dev-server --config build/webpack.standalone.js'.
2017-05-04T13:51:41.274199+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-05-04T13:51:41.274353+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the innova-client package,
2017-05-04T13:51:41.274469+00:00 app[web.1]: npm ERR! not with npm itself.
2017-05-04T13:51:41.274601+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-05-04T13:51:41.274735+00:00 app[web.1]: npm ERR!     webpack-dev-server --config build/webpack.standalone.js
2017-05-04T13:51:41.274895+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-05-04T13:51:41.275008+00:00 app[web.1]: npm ERR!     npm bugs innova-client
2017-05-04T13:51:41.275144+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-05-04T13:51:41.275281+00:00 app[web.1]: npm ERR!     npm owner ls innova-client
2017-05-04T13:51:41.275407+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-05-04T13:51:41.280628+00:00 app[web.1]:
2017-05-04T13:51:41.280973+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-05-04T13:51:41.281167+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-05-04T13:51:43.507550+00:00 heroku[web.1]: Starting process with command `npm start`
2017-05-04T13:51:46.187246+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-04T13:51:46.170663+00:00 heroku[web.1]: Process exited with status 1
2017-05-04T13:51:46.080016+00:00 app[web.1]:
2017-05-04T13:51:46.080035+00:00 app[web.1]: > innova-client@ start /app
2017-05-04T13:51:46.080036+00:00 app[web.1]: > webpack-dev-server --config build/webpack.standalone.js
2017-05-04T13:51:46.080037+00:00 app[web.1]:
2017-05-04T13:51:46.085844+00:00 app[web.1]: sh: 1: webpack-dev-server: not found
2017-05-04T13:51:46.090229+00:00 app[web.1]:
2017-05-04T13:51:46.098379+00:00 app[web.1]: npm ERR! node v6.10.3
2017-05-04T13:51:46.097880+00:00 app[web.1]: npm ERR! Linux 3.13.0-112-generic
2017-05-04T13:51:46.098161+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-05-04T13:51:46.098567+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-05-04T13:51:46.098738+00:00 app[web.1]: npm ERR! file sh
2017-05-04T13:51:46.099801+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-05-04T13:51:46.098883+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-05-04T13:51:46.099017+00:00 app[web.1]: npm ERR! errno ENOENT
2017-05-04T13:51:46.099270+00:00 app[web.1]: npm ERR! syscall spawn
2017-05-04T13:51:46.099402+00:00 app[web.1]: npm ERR! innova-client@ start: `webpack-dev-server --config build/webpack.standalone.js`
2017-05-04T13:51:46.099497+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-05-04T13:51:46.099611+00:00 app[web.1]: npm ERR!
2017-05-04T13:51:46.099715+00:00 app[web.1]: npm ERR! Failed at the innova-client@ start script 'webpack-dev-server --config build/webpack.standalone.js'.
2017-05-04T13:51:46.099918+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the innova-client package,
2017-05-04T13:51:46.100003+00:00 app[web.1]: npm ERR! not with npm itself.
2017-05-04T13:51:46.104341+00:00 app[web.1]:
2017-05-04T13:51:46.100094+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-05-04T13:51:46.100170+00:00 app[web.1]: npm ERR!     webpack-dev-server --config build/webpack.standalone.js
2017-05-04T13:51:46.100261+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-05-04T13:51:46.100340+00:00 app[web.1]: npm ERR!     npm bugs innova-client
2017-05-04T13:51:46.100435+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-05-04T13:51:46.100600+00:00 app[web.1]: npm ERR!     npm owner ls innova-client
2017-05-04T13:51:46.100763+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-05-04T13:51:46.104506+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-05-04T13:51:46.104590+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-05-04T13:51:47.506127+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=socletechnique.herokuapp.com request_id=02ed8b61-fa43-417c-a5c7-64b510d4a2b8 fwd="77.154.192.115" dyno= connect= service= status=503 bytes= protocol=https
2017-05-04T13:51:47.864947+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=socletechnique.herokuapp.com request_id=c9efb2df-46db-40e2-bc44-c4026a08ed5f fwd="77.154.192.115" dyno= connect= service= status=503 bytes= protocol=https

你知道为什么它不能在heroku上运行吗?

修改

我将'devDependencies'中的依赖项移动到'dependencies'中并且它有效。 现在它仍然崩溃,因为它无法找到我用于编码的'react'库... 这是日志:

>heroku logs
2017-05-05T08:45:50.259390+00:00 app[web.1]:   [397] ./~/redux-persist/lib/defaults/asyncLocalStorage.js 3.73 kB {0} [built]
2017-05-05T08:45:50.259391+00:00 app[web.1]:   [398] ./~/redux-persist/lib/utils/setImmediate.js 205 bytes {0} [built]
2017-05-05T08:45:50.259391+00:00 app[web.1]:   [399] ./~/redux-persist/lib/purgeStoredState.js 1.61 kB {0} [built]
2017-05-05T08:45:50.259392+00:00 app[web.1]:   [400] ./~/json-stringify-safe/stringify.js 907 bytes {0} [built]
2017-05-05T08:45:50.259392+00:00 app[web.1]:   [401] ./~/redux-persist/lib/createTransform.js 769 bytes {0} [built]
2017-05-05T08:45:50.259392+00:00 app[web.1]:   [402] ./~/redux-persist/lib/getStoredState.js 3.41 kB {0} [built]
2017-05-05T08:45:50.259393+00:00 app[web.1]:   [403] ./~/redux-persist/lib/persistStore.js 2.53 kB {0} [built]
2017-05-05T08:45:50.259393+00:00 app[web.1]:   [404] ./src/components/App.tsx 514 bytes {0} [built]
2017-05-05T08:45:50.259394+00:00 app[web.1]:   [405] ./src/components/Header.tsx 906 bytes {0} [built]
2017-05-05T08:45:50.259394+00:00 app[web.1]:   [406] ./src/components/NavLink.tsx 588 bytes {0} [built]
2017-05-05T08:45:50.259395+00:00 app[web.1]:   [407] ./src/pages/accueil/index.tsx 206 bytes {0} [built]
2017-05-05T08:45:50.259395+00:00 app[web.1]:   [408] ./src/modules/cv/containers/CvListContainer.tsx 1.59 kB {0} [built]
2017-05-05T08:45:50.259396+00:00 app[web.1]:   [409] ./src/modules/cv/components/CvList.tsx 366 bytes {0} [built]
2017-05-05T08:45:50.259396+00:00 app[web.1]:   [410] ./src/modules/cv/components/Cv.tsx 517 bytes {0} [built]
2017-05-05T08:45:50.259397+00:00 app[web.1]:   [411] ./src/pages/recupererCv/index.tsx 552 bytes {0} [built]
2017-05-05T08:45:50.259397+00:00 app[web.1]:   [412] ./src/modules/cv/containers/FormFindCvContainer.tsx 1.99 kB {0} [built]
2017-05-05T08:45:50.259398+00:00 app[web.1]:   [413] ./src/modules/cv/components/FormFindCv.tsx 585 bytes {0} [built]
2017-05-05T08:45:50.259398+00:00 app[web.1]:   [414] ./src/modules/cv/containers/DetailCvRechercheContainer.tsx 2.14 kB {0} [built]
2017-05-05T08:45:50.259399+00:00 app[web.1]:   [415] ./src/pages/ajouterCv/index.tsx 534 bytes {0} [built]
2017-05-05T08:45:50.259399+00:00 app[web.1]:   [416] ./src/modules/cv/containers/CreateCvContainer.tsx 2.03 kB {0} [built]
2017-05-05T08:45:50.259400+00:00 app[web.1]:   [417] ./src/modules/cv/components/CreateCv.tsx 1.65 kB {0} [built]
2017-05-05T08:45:50.259400+00:00 app[web.1]:   [418] ./src/modules/cv/containers/DetailCvAjoutContainer.tsx 2.01 kB {0} [built]
2017-05-05T08:45:50.259403+00:00 app[web.1]:   [419] ./src/pages/modifierCv/index.tsx 230 bytes {0} [built]
2017-05-05T08:45:50.259403+00:00 app[web.1]:   [420] ./src/modules/cv/containers/ModifierCvRootContainer.tsx 1.7 kB {0} [built]
2017-05-05T08:45:50.259404+00:00 app[web.1]:   [421] ./src/modules/cv/containers/ModifierCvContainer.tsx 2.68 kB {0} [built]
2017-05-05T08:45:50.259404+00:00 app[web.1]:   [422] ./src/modules/cv/components/ModifierCv.tsx 1.8 kB {0} [built]
2017-05-05T08:45:50.259405+00:00 app[web.1]:   [423] ./src/modules/cv/containers/DetailCvUpdateContainer.tsx 2.03 kB {0} [built]
2017-05-05T08:45:50.259405+00:00 app[web.1]:   [424] ./~/lodash/lodash.js 540 kB {0} [built]
2017-05-05T08:45:50.259406+00:00 app[web.1]:   [425] ./src/pages/detailCv/index.tsx 212 bytes {0} [built]
2017-05-05T08:45:50.259406+00:00 app[web.1]:   [426] ./src/modules/cv/containers/DetailCvContainer.tsx 467 bytes {0} [built]
2017-05-05T08:45:50.259409+00:00 app[web.1]:   [427] ./src/modules/cv/components/DetailCv.tsx 459 bytes {0} [built]
2017-05-05T08:45:50.259410+00:00 app[web.1]:
2017-05-05T08:45:50.259411+00:00 app[web.1]: ERROR in ./src/index.tsx
2017-05-05T08:45:50.259411+00:00 app[web.1]: Module not found: Error: Cannot resolve 'file' or 'directory' ./pages/NotFound in /app/src
2017-05-05T08:45:50.259412+00:00 app[web.1]:  @ ./src/index.tsx 15:17-44
2017-05-05T08:45:50.259412+00:00 app[web.1]:
2017-05-05T08:45:50.259413+00:00 app[web.1]: ERROR in [at-loader] ./src/components/NavLink.tsx:2:31
2017-05-05T08:45:50.259414+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-router'. '/app/node_modules/react-router/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259414+00:00 app[web.1]:
2017-05-05T08:45:50.259415+00:00 app[web.1]: ERROR in [at-loader] ./src/index.tsx:2:22
2017-05-05T08:45:50.259416+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-dom'. '/app/node_modules/react-dom/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259416+00:00 app[web.1]:
2017-05-05T08:45:50.259417+00:00 app[web.1]: ERROR in [at-loader] ./src/index.tsx:3:67
2017-05-05T08:45:50.259417+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-router'. '/app/node_modules/react-router/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259418+00:00 app[web.1]:
2017-05-05T08:45:50.259418+00:00 app[web.1]: ERROR in [at-loader] ./src/index.tsx:4:36
2017-05-05T08:45:50.259419+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-router-redux'. '/app/node_modules/react-router-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259420+00:00 app[web.1]:
2017-05-05T08:45:50.259420+00:00 app[web.1]: ERROR in [at-loader] ./src/index.tsx:5:24
2017-05-05T08:45:50.259421+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259421+00:00 app[web.1]:
2017-05-05T08:45:50.259422+00:00 app[web.1]: ERROR in [at-loader] ./src/index.tsx:13:26
2017-05-05T08:45:50.259422+00:00 app[web.1]:     TS2307: Cannot find module './pages/NotFound'.
2017-05-05T08:45:50.259423+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/actions/DetailCvAction.tsx:2:24
2017-05-05T08:45:50.259423+00:00 app[web.1]:
2017-05-05T08:45:50.259424+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259424+00:00 app[web.1]:
2017-05-05T08:45:50.259425+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/components/Cv.tsx:3:20
2017-05-05T08:45:50.259425+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-router'. '/app/node_modules/react-router/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259426+00:00 app[web.1]:
2017-05-05T08:45:50.259426+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/CreateCvContainer.tsx:3:23
2017-05-05T08:45:50.259427+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259427+00:00 app[web.1]:
2017-05-05T08:45:50.259428+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/CvListContainer.tsx:2:30
2017-05-05T08:45:50.259429+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-router'. '/app/node_modules/react-router/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259429+00:00 app[web.1]:
2017-05-05T08:45:50.259430+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/CvListContainer.tsx:3:23
2017-05-05T08:45:50.259431+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259432+00:00 app[web.1]:
2017-05-05T08:45:50.259432+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvAjoutContainer.tsx:2:23
2017-05-05T08:45:50.259433+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259434+00:00 app[web.1]:
2017-05-05T08:45:50.259435+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'lodash'. '/app/node_modules/lodash/lodash.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259435+00:00 app[web.1]:
2017-05-05T08:45:50.259434+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvContainer.tsx:2:25
2017-05-05T08:45:50.259436+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvContainer.tsx:3:23
2017-05-05T08:45:50.259436+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259437+00:00 app[web.1]:
2017-05-05T08:45:50.259437+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvContainer.tsx:6:35
2017-05-05T08:45:50.259438+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-router'. '/app/node_modules/react-router/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259438+00:00 app[web.1]:
2017-05-05T08:45:50.259439+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvContainer.tsx:14:81
2017-05-05T08:45:50.259440+00:00 app[web.1]:     TS2339: Property 'params' does not exist on type 'IProps'.
2017-05-05T08:45:50.259440+00:00 app[web.1]:
2017-05-05T08:45:50.259440+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvRechercheContainer.tsx:2:23
2017-05-05T08:45:50.259441+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259442+00:00 app[web.1]:
2017-05-05T08:45:50.259442+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/DetailCvUpdateContainer.tsx:2:23
2017-05-05T08:45:50.259443+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259443+00:00 app[web.1]:
2017-05-05T08:45:50.259444+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/FormFindCvContainer.tsx:5:23
2017-05-05T08:45:50.259448+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:45:50.259449+00:00 app[web.1]:
2017-05-05T08:45:50.259449+00:00 app[web.1]: ERROR in [at-loader] ./src/modules/cv/containers/ModifierCvContainer.tsx:7:23
2017-05-05T08:45:50.259450+00:00 app[web.1]:     TS7016: Could not find a declaration file for module 'react-redux'. '/app/node_modules/react-redux/lib/index.js' implicitly has an 'any' type.
2017-05-05T08:46:38.990271+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-05-05T08:46:38.990271+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-05-05T08:46:39.145493+00:00 heroku[web.1]: Process exited with status 137
2017-05-05T08:46:39.163148+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-05T08:46:41.159604+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=socletechnique.herokuapp.com request_id=07a2a72d-1cd8-456c-905f-97bf66ae842b fwd="77.154.192.115" dyno= connect= service= status=503 bytes= protocol=https
2017-05-05T08:46:40.612403+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=socletechnique.herokuapp.com request_id=49ac63e2-84a7-4299-a84b-08e0ae1e7f90 fwd="77.154.192.115" dyno= connect= service= status=503 bytes= protocol=https

2 个答案:

答案 0 :(得分:0)

它说:

npm install -g package-name

确保您已安装此模块,此外,因为您尝试从控制台运行它,您可能需要使用-g标志(app.post("/order", function(req, res, body) )全局安装它

答案 1 :(得分:0)

修改

我不确定是什么导致了这个问题,但你可以从它的路径调用它:./node_modules/.bin/webpack-dev-server或使用-g标志全局安装它。这很可能与用户许可相关。