This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 842281 - Failed to install sqlite3 module for nodejs-0.6 app using package.json and deplist.txt
Failed to install sqlite3 module for nodejs-0.6 app using package.json and de...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 06:55 EDT by jizhao
Modified: 2015-05-14 18:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-07 16:42:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Detailed log of npm (25.30 KB, text/x-log)
2012-07-23 06:55 EDT, jizhao
no flags Details

  None (edit)
Description jizhao 2012-07-23 06:55:12 EDT
Created attachment 599755 [details]
Detailed log of npm

Description of problem:
Create a nodejs-0.6 app and add "sqlite3" to package.json or deplist.txt. Git push all the changes and the installation will fail. But if you login to the server and run "npm install sqlite3", the installation will succeed. I've attached the npm-debug.log.

Version-Release number of selected component (if applicable):
devenv_1906

How reproducible:
Always

Steps to Reproduce:
1.Create a nodejs-0.6 app
2.add sqlite3 to <git_repo>/package.json
<-----------------code snippets------------------------>
  "dependencies": {
    "sqlite3": "2.1.5"
  },
<------------------------------------------------------>
or add sqlite3 to deplist.txt
3.Git push
  
Actual results:
Output of git push:
<----------------------output--------------------->
remote: Saving away previously installed Node modules
remote: ~/git/app2.git ~/git/app2.git
remote: ~/git/app2.git
remote: Running .openshift/action_hooks/pre_build
remote: npm info it worked if it ends with ok
remote: npm info using npm@1.1.24
remote: npm info using node@v0.6.19
remote: npm info preinstall OpenShift-Sample-App@1.0.0
remote: npm http GET https://registry.npmjs.org/sqlite3/2.1.5
remote: npm http 304 https://registry.npmjs.org/sqlite3/2.1.5
remote: npm info into /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo sqlite3@2.1.5
remote: npm info installOne sqlite3@2.1.5
remote: npm info unbuild /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo/node_modules/sqlite3
remote: npm info preinstall sqlite3@2.1.5
remote: npm info build /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo/node_modules/sqlite3
remote: npm info linkStuff sqlite3@2.1.5
remote: npm info install sqlite3@2.1.5
remote: 
remote: > sqlite3@2.1.5 install /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo/node_modules/sqlite3
remote: > node-gyp rebuild
remote: 
remote: info it worked if it ends with ok 
remote: info downloading: http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz 
remote: ERR! Error: EXDEV, link '/usr/lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/gyptest.pyc'
remote: ERR! not ok
remote: npm info sqlite3@2.1.5 Failed to exec install script
remote: npm info unbuild /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo/node_modules/sqlite3
remote: npm info preuninstall sqlite3@2.1.5
remote: npm info uninstall sqlite3@2.1.5
remote: npm info postuninstall sqlite3@2.1.5
remote: 
remote: npm ERR! sqlite3@2.1.5 install: `node-gyp rebuild`
remote: npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
remote: npm ERR! 
remote: npm ERR! Failed at the sqlite3@2.1.5 install script.
remote: npm ERR! This is most likely a problem with the sqlite3 package,
remote: npm ERR! not with npm itself.
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR!     node-gyp rebuild
remote: npm ERR! You can get their info via:
remote: npm ERR!     npm owner ls sqlite3
remote: npm ERR! There is likely additional logging output above.
remote: npm ERR! 
remote: npm ERR! System Linux 2.6.32-279.2.1.el6.x86_64
remote: npm ERR! command "node" "/usr/bin/npm" "install" "-d"
remote: npm ERR! cwd /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo
remote: npm ERR! node -v v0.6.19
remote: npm ERR! npm -v 1.1.24
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! message sqlite3@2.1.5 install: `node-gyp rebuild`
remote: npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
remote: npm ERR! errno {}
remote: npm ERR! 
remote: npm ERR! Additional logging details can be found in:
remote: npm ERR!     /var/lib/stickshift/77031ae6eb324c71901a522d80d596ed/app-root/runtime/repo/npm-debug.log
remote: npm not ok
remote: npm not ok
remote: Running .openshift/action_hooks/build
remote: Running .openshift/action_hooks/deploy
remote: Starting application...
remote: Done
<------------------------------------------->

Expected results:
sqlite3 should be installed successfully.

Additional info:
Comment 1 Mrunal Patel 2012-07-26 20:04:04 EDT
Hi,
Logging into the app and trying npm install sqlite3 fails with the same
error for me and that makes me suspect that it is an issue with the sqlite3 package itself. Could you tell me which directory did you execute it from?

- Mrunal
Comment 2 jizhao 2012-07-30 00:43:01 EDT
(In reply to comment #1)
> Hi,
> Logging into the app and trying npm install sqlite3 fails with the same
> error for me and that makes me suspect that it is an issue with the sqlite3
> package itself. Could you tell me which directory did you execute it from?
> 
> - Mrunal

Hi,
By logging into the server, I mean log in the server as root in devenv environment.
Steps:
1. Log into the server as root.
2. npm install sqlite3
The latest sqlite3 version is 2.1.5. It can't be installed successfully if you add it to package.json, but can be installed by root user on the server.
Besides, sqlite3 2.1.0 can be successfully installed using package.json.
Comment 3 John Poelstra 2012-07-31 13:15:57 EDT
discussing with Ram, expect to fix today
Comment 4 Mrunal Patel 2012-07-31 21:19:39 EDT
Ram and I spent a lot of time looking into this today.

This will be fixed as part of move to nodejs-0.8. 

Till then, there are two options:
1. Use a version that works (2.1.0 for sqlite3)
 
2. Or use this workaround -
   - First add node-gyp to package.json
   - git push
   - Next, ssh into the app and run $OPENSHIFT_REPO_DIR/node_modules/.bin/node-gyp rebuild (You will see some exceptions that can be ignored)
   - Now, you can add sqlite3 to package.json and git push and it should get installed

Thanks,
Mrunal
Comment 5 jizhao 2012-08-01 03:23:01 EDT
According to comment 4, verify this bug.

Note You need to log in before you can comment on or make changes to this bug.