petersirka/nosql

TypeError when using with express

Lunik opened this issue · 4 comments

Lunik commented

Hi,
I'm trying to use your module but when I use it with Express I get this error.

TypeError: Cannot read property 'query' of undefined
   at IncomingMessage.get query [as query] (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/total.js/index.js:14254:50)
   at query (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/middleware/query.js:44:13)
   at Layer.handle [as handle_request] (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/router/index.js:312:13)
   at /Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/router/index.js:280:7
   at Function.process_params (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/router/index.js:330:12)
   at next (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/router/index.js:271:10)
   at Function.handle (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/router/index.js:176:3)
   at EventEmitter.handle (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/application.js:173:10)
   at Server.app (/Users/guillaumemartinez/Desktop/dev/lunik-torrent/node_modules/express/lib/express.js:38:9)

To get this error, I'm only doing

var NoSQL = require('nosql')

What should I do ?

Hi,
I'll try to fix today. Thank you.

Lunik commented

Here is the code to reproduce :)

var nosql = require('nosql')
var express = require('express')

var app = express()

app.listen('8080')
app.get('/', function(req, res){
    res.end('OK')
})

@Lunik please try to use a new beta version npm install nosql@beta. Thank you!

Lunik commented

Work fine in 4.2.0 thanks :)