-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Failed on Raspberry Pi #165
Comments
This is happening because it appears your node.js binary is called alias node=nodejs
npm test |
I had the same problem and it end up being that you had a much older version of nodejs installed by the apt-get, which in your case reads:
What I did to solve this problem is to remove them, by:
This should remove your old version of node and npm, then try This is the link to my issue: #163 |
Thank you for the quick responses. Elgs - after I remove node and npm, all I have to do is run npm install sqlite3? Sorry I am such I newb! |
Yes. However, it may take a long time to build the whole thing, which took 30 minutes on my RPi, you may refer to the link I provided #163, at the bottom of that thread, @springmeyer has given a way to avoid long compiling time. See if that helps you. |
I am still getting errors (after trying the alias). This is the first thing I am doing with my raspi, what would the "correct" steps be to set up node.js, sqlite3, and node-sqlite3 on my pi if I started with a clean install? I would not lose anything if I started over fresh (if that would be easier). |
I don't believe the alias thing is the cause of this problem. The real problem is that you have a hidden old version of node installed by apt-get. Try remove them and install it again using the one you downloaded from the nodejs website. |
After uninstall/reinstall as per above, do I need to reinstall node-sqlite3, or is it still okay as is? |
@elgs - note that the error was:
|
btw, I have no personal experience with rasp pi, so I'm going to close this issue. You two feel free to share ideas still however. |
Thanks for your help springmeyer! |
@hightechlofi yes, after uninstall node/npm with sudo apt-get remove, you need to reinstall node-sqlite3 by |
As you mentioned your node version is 0.10.12, so I assume that this version was what you downloaded from the nodejs website, as opposed to getting from apt-get. If this is the case, you probably need to add node to you PATH. What I did was adding this line to the end of /etc/profile: |
@hightechlofi after you uninstalled the old node, try @springmeyer I'm afraid the reason of node: not found was that the new version of node was not on the PATH. |
I had this exact same problem when trying to install a custom software using nodejs on linux mint 14.1 virtual box in windows 7 host. PS: Avoid compiling and performing "make" and "make install" for nodejs in shared folder in virtual box. Symbolic link creation is disabled inside shared folders in virtual box. |
I have installed node.js 0.10.12 and then installed node-sqlite3. When I run npm test I get the following:
Creating test database... This may take several minutes.
/bin/sh: 3: node: not found
make: *** [db] Error 127
npm ERR! sqlite3@2.1.12 pretest:
make db
npm ERR!
sh "-c" "make db"
failed with 2npm ERR!
npm ERR! Failed at the sqlite3@2.1.12 pretest script.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make db
npm ERR! You can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.1.9adafruit+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "test"
npm ERR! cwd /node-sqlite3
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message sqlite3@2.1.12 pretest:
make db
npm ERR! message
sh "-c" "make db"
failed with 2npm ERR! errno {}
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
npm WARN /usr/share/doc/nodejs/README.Debian
npm WARN
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /node-sqlite3/npm-debug.log
npm not ok
The log reads as follows:
nfo it worked if it ends with ok
verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'test' ]
info using npm@1.1.4
info using node@v0.6.19
verbose config file /root/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/share/npm/npmrc
verbose caching /node-sqlite3/package.json
verbose loadDefaults sqlite3@2.1.12
verbose run-script [ 'pretest', 'test', 'posttest' ]
info pretest sqlite3@2.1.12
verbose unsafe-perm in lifecycle true
silly exec sh "-c" "make db"
silly spawning [ 'sh', [ '-c', 'make db' ], '/node-sqlite3' ]
info sqlite3@2.1.12 Failed to exec pretest script
ERR! sqlite3@2.1.12 pretest:
make db
ERR!
sh "-c" "make db"
failed with 2ERR!
ERR! Failed at the sqlite3@2.1.12 pretest script.
ERR! This is most likely a problem with the sqlite3 package,
ERR! not with npm itself.
ERR! Tell the author that this fails on your system:
ERR! make db
ERR! You can get their info via:
ERR! npm owner ls sqlite3
ERR! There is likely additional logging output above.
ERR!
ERR! System Linux 3.1.9adafruit+
ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "test"
ERR! cwd /node-sqlite3
ERR! node -v v0.6.19
ERR! npm -v 1.1.4
ERR! code ELIFECYCLE
ERR! message sqlite3@2.1.12 pretest:
make db
ERR! message
sh "-c" "make db"
failed with 2ERR! errno {}
verbose exit [ 1, true ]
I am extremely new to all of this, so I could have easily screwed it up myself. From a fresh raspi I did the following to install:
sudo apt-get install nodejs npm node-semver
then per the build instructions:
git clone git://github.com/developmentseed/node-sqlite3.git
cd node-sqlite3
npm install
and
npm install mocha
npm test
After the first npm test failure I ran sudo apt-get install sqlite3 as I thought maybe I needed to, hope that didn't screw things up.
Any help would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: