Does not work with node v6.5
See original GitHub issueHi, I have a webapp that I built using the koa v2 framework. I use koa-convert, koa-generic-session and koa-redis to store user sessions in my redis instance. Since upgrading to node v6.5, my webapp fails with the following stacktrace:
TypeError: Cannot read property 'done' of undefined
at next (/Users/dev/work/node_modules/co/index.js:98:14)
at onFulfilled (/Users/dev/work/node_modules/co/index.js:69:7)
at /Users/Stephen/dev/work/node_modules/co/index.js:54:5
at Object.co (/Users/dev/work/node_modules/co/index.js:50:10)
at next (/Users/dev/work/node_modules/co/index.js:99:29)
at onFulfilled (/Users/dev/work/node_modules/co/index.js:69:7)
It worked fine with node v6.4. The stacktrace doesnt go past co, but through trial and error, I deleted a lot of third party libs and middleware and narrowed it down to this block of code:
app.use(convert(session({
key: 'session',
errorHandler(err, type, ctx) {
console.error(err, type)
},
store: redisStore({ url: config.redis.url })
})))
which can be reduced to app.use(convert(session()))
and still trigger the same bug.
I do not use the convert lib anywhere else in the app so I cannot quickly test to see if the issue is specifically in the convert or session lib.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
npm does not support Node.js v12.18.3 - Stack Overflow
I found the work-around ! First you need to open your cmd line, and use " npm install -g npm@latest " you'll get...
Read more >How to fix 'npm does not support Node.js v14' error on ...
Uninstall node.js (Windows Add/Remove programs) · Manually delete the npm folder from your user profile (%APPDATA%/roaming/npm) · Install node.js ...
Read more >Support Node 6 installs | Better world by better software
In this blog post I will show how to bundle and transpile your NPM package so it truly runs on Node v8.0.0 or...
Read more >npm does not support Node.js v10.15.2 · Issue #1877 - GitHub
It looks like current installed npm is not compatible with Node.js version you are using. You'll probably need to update your npm using...
Read more >node-sass - npm
Install. npm install node-sass. Some users have reported issues installing on Ubuntu due to node being registered to another package.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a bug in V8 with tail call optimization. The
--harmony-tailcalls
flag (implied by--harmony
) is enough to trigger it. It will probably not be fixed in Node.js because the feature is not considered stable in V8 5.1. I suggest you drop the--harmony
flag and if you really need one of the features that it activates, enable it directly. Here is the list: https://github.com/nodejs/node/blob/v6.5.0/deps/v8/src/flag-definitions.h#L211-L216Did some more testing. Its due to the
--harmony
flag that I am including when running node.Smallest failing test case:
Running
node --harmony index.js
then hitting localhost:3000 in a webbrowser returns a 500 instead of the expected 404.Running without the harmony flag works as expected.