nickredmark / staart

A starter library for node projects with user accounts.
MIT License
313 stars 39 forks source link

Can't run with Node 7 or 8 #12

Closed theednaffattack closed 7 years ago

theednaffattack commented 7 years ago

Hi,

I'm aware of the harmony async await flag issue with node 8 but I can't get this to run with node 7 either.

Which is weird because I could a few weeks ago. I get the output below when I try running "npm run dev" with node 7.5.0 and npm 4.1.2

I checked "at ServerResponse._send (_http_outgoing.js:140:38)" from the line below and it's something to do with "chunks". I tried switching to Yarn (I'd never used it) but ended up at the same place.

Any help you can give is appreciated.

Online at http://localhost:3000
TypeError: Cannot read property 'length' of null
    at ServerResponse._send (_http_outgoing.js:140:38)
    at ServerResponse.write (_http_outgoing.js:501:16)
    at writetop (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/express-session/index.js:290:26)
    at ServerResponse.end (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/express-session/index.js:338:16)
    at sendHTML (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/next/dist/server/render.js:463:7)
    at Server._callee17$ (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/next/dist/server/index.js:874:73)
    at tryCatch (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/regenerator-runtime/runtime.js:303:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
TypeError: Cannot read property 'length' of null
    at ServerResponse._send (_http_outgoing.js:140:38)
    at ServerResponse.write (_http_outgoing.js:501:16)
    at ServerResponse.end (_http_outgoing.js:600:10)
    at writeend (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/express-session/index.js:261:22)
    at Immediate.onsave (/Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/node_modules/express-session/index.js:335:11)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/eddienaff/.nvm/versions/node/v7.5.0/bin/node" "/Users/eddienaff/.nvm/versions/node/v7.5.0/bin/npm" "run" "dev"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! staart-example@0.0.0 dev: `node --harmony-async-await index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the staart-example@0.0.0 dev script 'node --harmony-async-await index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the staart-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node --harmony-async-await index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs staart-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls staart-example
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/eddienaff/Documents/Projects/personal/learning/demos/apollo-graphql/staart-example/npm-debug.log
nickredmark commented 7 years ago

As discussed via slack, it was some tab remained open that was polling the app.