Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running #82

Open
joshterrill opened this issue Aug 19, 2015 · 3 comments
Open

Error when running #82

joshterrill opened this issue Aug 19, 2015 · 3 comments

Comments

@joshterrill
Copy link

> node sharefest/server.js
/home/nitrous/ShareFest/node_modules/express/lib/express.js:99
      throw new Error('Most middleware (like ' + name + ') is no longer bundle
            ^
Error: Most middleware (like json) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.
    at Function.Object.defineProperty.get (/home/nitrous/ShareFest/node_modules/express/lib/express.js:99:13)
    at Object.<anonymous> (/home/nitrous/ShareFest/sharefest/server.js:27:16)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
npm ERR! Linux 3.16.0-34-generic
npm ERR! argv "node" "/usr/local/opt/nvm/versions/node/v0.12.5/bin/npm" "start"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! Sharefest@1.0.0 start: `node sharefest/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Sharefest@1.0.0 start script 'node sharefest/server.js'.
npm ERR! This is most likely a problem with the Sharefest package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node sharefest/server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls Sharefest
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/nitrous/ShareFest/npm-debug.log

Seems like something is wrong with the middleware.

@saurabhghewari
Copy link

I came across same issue. I resolved this by following these steps.

First of all remove express folder from Sharefest/node_modules/express
Then install express 4.13.x.
comment out these lines from server.js
// app.use(express.json());
// app.use(compression());
Replace from server.js
app.configure('development', function () {
app.configure('production', function () {
with
if (app.get('env') === 'development') {
if (app.get('env') === 'production') {
Respectively.
Now Replace all of these lines from server/lib/router.js
res.send(statusCode, resObject);
with
res.status(statusCode).send(resObject);
Now Replace these lines from server/lib/router.js
res.sendfile() with res.sendFile();

@lilmike
Copy link

lilmike commented Oct 21, 2016

Any news on this issue? Would be interested in hearing, as I'm also having this problem.
-Michael.

@AJ-Acevedo
Copy link

Has this project been abandoned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants