Monday 15 April 2013

sqlite - node.js and sqlite3 web app, corrupted unsorted chunks : / -


I am new to node and am trying on my Raspberry Pi. I have installed the latest version ()

and npm installed sqlite3 (created and also installed)

Now I am trying to run the following code:

  var http = ("http"); Var sqlite3 = expected ("sqlite3"). Verbose (); Var ports = 1337; Var ip = "192.168.2.15"; Http.createServer (function (req, res) {res.writeHead (200, {"Content-Type": "text / plain"}) var db = new sqlite3.Database (": memory:"); db.serialize (Function () {db.run ("Make Table Layram (Notice Text)"); console.log ("CREATE"); var stmt = db.prepare ("INSERT FORMEES (?)"); (Var I = 0 ; I & lt; 10; i ++) {stmt.run ("Ipsum" + i);} stmt.finalize (); console.log ("Start Selection ["]; db.each ("SELECT rowid as id , "Lerem", function (mistake, line) from the console {console.log (row.id + ":" + row.info);}); console.log ("] select end");}); console Log ("off"); db.close (); res.end ("hello world.");}). Listen (port, ip); console.log ("server is running http: //" + ip + ":" + Port);   

The output I get is:

  All Running http://192.168.2.15:12337 Select Start [] Choose Close Select 1: Ipsum 0 2: Ipsum 1 3: Ipsum 2 4: Ipsum 3 5: Ipsum 4 6: Ipsum 5 7: Ipsum 6 8: Ipsum 7 9: Ipsum 8 10: Ipsum 9 *** detected glibc *** node: free (): Non-corrupted chunks: 0x0072fe28 *** Canceled   

My impressions are that ether has a running position, even if I am using db.serialize or it is not working on PI (although sqlite3 compiled properly

thanks

Recently I faced this issue. I realized that I was not using a steady / recommended version of node. Js Resolved by downgrading 0.8.15

No comments:

Post a Comment