2016-05-10 23 views
1

dashDB模块升级最近有没有“ibm_db”? 我们一直在使用Bluemix node.js和ibm_db模块来访问dashDB。该模块工作正常,但现在在10.5.2016上,该模块不再在Bluemix上编译。我们一直使用的版本在package.json中定义为ibm_db^0.0.15。以下是Bluemix构建错误日志的示例。IBM Bluemix ibm_db dashDB模块0.0.15不再编译;模块升级或许?

----->Building dependencies 
    Prebuild detected (node_modules already exists) 
    Rebuilding any native modules 
    > [email protected] install /tmp/staged/app/node_modules/ibm_db 
    > node installer/driverInstall.js 
    module.js:327 
    throw err; 
^
    Error: Cannot find module 'fstream' 
    at Function.Module._resolveFilename (module.js:325:15) 
    at Function.Module._load (module.js:276:25) 
    at Module.require (module.js:353:17) 
    at require (internal/module.js:12:17) 
    at download_file_httpget (/tmp/staged/app/node_modules/ibm_db/installer/driverInstall.js:25:19) 
    at Object.<anonymous> (/tmp/staged/app/node_modules/ibm_db/installer/driverInstall.js:340:1) 
    at Module._compile (module.js:409:26) 
    at Object.Module._extensions..js (module.js:416:10) 
    at Module.load (module.js:343:32) 
    at Function.Module._load (module.js:300:12) 
    npm ERR! Linux 3.19.0-25-generic 
    npm ERR! argv "/tmp/staged/app/vendor/node/bin/node" "/tmp/staged/app/vendor/node/bin/npm" "rebuild" 
    npm ERR! node v4.4.3 
    npm ERR! npm v2.15.1 
    npm ERR! code ELIFECYCLE 
    npm ERR! [email protected] install: `node installer/driverInstall.js` 
    npm ERR! Exit status 1 
    npm ERR! 
    npm ERR! Failed at the [email protected] install script 'node installer/driverInstall.js'. 
    npm ERR! This is most likely a problem with the ibm_db package, 
    npm ERR! not with npm itself. 
    npm ERR! Tell the author that this fails on your system: 
    npm ERR!  node installer/driverInstall.js 
    npm ERR! You can get information on how to open an issue for this project with: 
    npm ERR!  npm bugs ibm_db 
    npm ERR! Or if that isn't available, you can get their info via: 
    npm ERR! 
    npm ERR!  npm owner ls ibm_db 
    npm ERR! There is likely additional logging output above. 
    npm ERR! Please include the following file with any support request: 
    npm ERR!  /tmp/staged/app/npm-debug.log 
-----> Build failed 

回答

0

你必须更新到ibm_db 0.0.18与Node.js的4.x使用。

根据您的日志,您使用Node.js的4.4.3,所以你package.json文件应该是这样的:

{ 
     "name": "NodejsStarterApp", 
     "version": "0.0.1", 
     "private": true, 
     "scripts": { 
       "start": "node app.js" 
     }, 
     "dependencies": { 
       "express": "4.13.x", 
       "cfenv": "1.0.x", 
       "ibm_db": "0.0.18" 
     }, 
     "repository": {}, 
     "engines": { 
       "node": "4.x" 
     } 
} 
+0

你的回答解决了问题。在Bluemix中,还有节点版本0.12.x,该版本高兴地编译了ibm_db 0.0.15。 – Jari