node.js - Why is Heroku running a webpack process when I am using express.js? -
i uninstalled webpack , removed webpack.config.js
file use express.js
heroku. after committing , pushing heroku, log reads this:
$ heroku logs 2017-09-10t17:42:43.224045+00:00 heroku[web.1]: state changed crashed starting 2017-09-10t17:42:02.000000+00:00 app[api]: build succeeded 2017-09-10t17:42:47.480825+00:00 heroku[web.1]: starting process command `node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js` 2017-09-10t17:42:50.050087+00:00 app[web.1]: module.js:471 2017-09-10t17:42:50.050108+00:00 app[web.1]: throw err; 2017-09-10t17:42:50.050108+00:00 app[web.1]: ^ 2017-09-10t17:42:50.050109+00:00 app[web.1]: 2017-09-10t17:42:50.050110+00:00 app[web.1]: error: cannot find module '/app/node_modules/webpack-dev-server/bin/webpack-dev-server.js'
the starting process in log trying initiate webpack ^, in procfile have this:
web: node server.js
to confirm that, here heroku ps
$ heroku ps === web (free): node server.js (1) web.1: 2017/09/10 14:41:56 -0400 (~ 27m ago)
package.json:
{ "name": "youtube-instant-search", "version": "1.0.0", "description": "renders youtube videos after keystrokes", "main": "index.js", "repository": "git@github.com:mattwarren10/youtube-instant- search.git", "scripts": { "start": "node server.js" }, "author": "", "license": "isc", "devdependencies": { "babel": "^5.8.29", "babel-cli": "^6.26.0", "babel-core": "^6.26.0", "babel-eslint": "^7.2.3", "babel-loader": "^6.4.1", "babel-preset-env": "^1.6.0", "babel-preset-es2015": "^6.24.1", "babel-preset-es2016": "^6.24.1", "babel-preset-react": "^6.24.1", "babel-preset-stage-2": "^6.24.1", "babelify": "^7.3.0", "bootstrap": "^4.0.0-alpha.6", "browserify": "^14.4.0", "css-loader": "^0.28.7", "eslint": "^4.6.1", "node-sass": "^4.5.3", "rimraf": "^2.6.1", "sass-loader": "^6.0.6", "style-loader": "^0.18.2" }, "dependencies": { "@types/react-addons-create-fragment": "^0.14.17", "babel-preset-stage-1": "^6.1.18", "core-js": "^2.5.1", "express": "^4.15.4", "lodash": "^3.10.1", "prop-types": "^15.5.10", "react": "^0.14.3", "react-dom": "^0.14.3", "react-intl": "^2.3.0", "react-redux": "^4.0.0", "redux": "^3.0.4", "youtube-api-search": "0.0.5" } }
server.js:
var express = require('express'); var app = express(); var path = require('path'); app.use(express.static(path.join(__dirname))); app.use("/style", express.static(__dirname)); // viewed @ based directory http://localhost:8080/ app.get('/', function (req, res) { res.sendfile(path.join(__dirname + 'index.html')); }); app.listen(process.env.port || 8080);
does take time heroku update? what's going on?
Comments
Post a Comment