[I tried to include more links to make my questions more clear but stackoverflow wouldn't let me because I do not have 10 reputation points.]
I have node.js and now I want to choose a sqlite module for it and my choices are: orlandov/node-sqlite, developmentseed/node-sqlite3, and grumdrig/node-sqlite. I eliminated grumdrig because only synchronous access is supported.
When I tried to explore developmentseed by following their directions, I encounter this problem:
./configure ./configure: line 3: node-gyp: command not found
So I tried to use npm install (also suggested) and encounter this problem:
npm install sqlite3 -bash: npm: command not found
When I tried to get npm with
curl http://npmjs.org/install.sh | sh
I encounter this problem (even with sudo and changing owner/permission):
curl http://npmjs.org/install.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 85 0 85 0 0 175 0 --:--:-- --:--:-- --:--:-- 0 **sh: line 1: syntax error near unexpected token `newline'** sh: line 1: `<html>Moved: <a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a>'
I am also having trouble configuring node-sqlite by orlandov.
I just wanted to play around with node-sqlite (by orlandov) and node-sqlite3 (by developmentseed) so I can choose the better one but am stuck here.
Oh, I also looked into node-gyp at github -- /TooTallNate/node-gyp/ but it seems to also need npm.
I'd appreciate any suggestions on how to get these to build and/or which to use between developmentseed and orlandov's.
To install npm directly use this command:
curl -k https://npmjs.org/install.sh | sudo sh
If you use Ubuntu you can install lastest versions of node.js and npm from PPA. Note: you need to remove your current nodejs first.
sudo apt-get install python-software-properties sudo apt-add-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs nodejs-dev npm
sudo npm install -g node-gyp
Now you ready to install sqlite3 from npm.
npm install sqlite3
Note: build tools need to be installed before sqlite3 setup.
sudo apt-get install build-essential
There is currently no discussion for this recipe.
This recipe can be found in it's original form on Stack Over Flow.