IBM Bluemix ibm_db dashDB module 0.0.15 no longer compiles; module upgrade perhaps? - node.js

Has there been a recent "ibm_db" for dashDB module upgrade?
We have been using the Bluemix node.js and ibm_db module to access dashDB. The module has worked ok but now on 10.5.2016 the module no longer compiles on Bluemix. The version we have been using is defined in package.json as ibm_db ^0.0.15. Below is an example of the Bluemix building error log.
----->Building dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> ibm_db#0.0.15 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! ibm_db#0.0.15 install: `node installer/driverInstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ibm_db#0.0.15 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

You have to update to ibm_db 0.0.18 to use with Node.js 4.x.
Per your logs you are using Node.js 4.4.3, so your package.json file should be something like:
{
"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"
}
}

Related

Unable to use `npm run build` due to `\node_modules\tablemark\dist\index.js` being missing

I am trying to use npm run build and I am unable to run is as I am being told that \node_modules\tablemark\dist\index.js is not found. The error is as follows:
> node .
internal/modules/cjs/loader.js:456
throw e;
^
Error: Cannot find module 'D:\Avin Dev\dev-hearts\node_modules\tablemark\dist\index.js'
at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
at resolveExports (internal/modules/cjs/loader.js:450:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (D:\Avin Dev\dev-hearts\index.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14) {
code: 'MODULE_NOT_FOUND',
path: 'D:\\Avin Dev\\dev-hearts\\node_modules\\tablemark\\package.json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hearts#1.0.0 build: `node .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hearts#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\avini\AppData\Roaming\npm-cache\_logs\2021-11-08T07_10_51_261Z-debug.log
So far I have tried:
Completely reinstalling npm.
Installing tablemark separately using npm install tablemark
My NPM version is: 6.14.15 and my Node version is v14.18.1

Deploying a meteor 1.2 app to Ubuntu 16.04

I have an app that is still at meteor 1.2 that I used to deploy to ubuntu 14.04 servers happily with mup. However, I have now moved the host server along to 16.04 and mup (as well as mupc) have stopped working.
The last time I deployed one of these apps I followed the procedure below and it worked fine.
apt install nodejs nodejs-legacy
install nvm
nvm install v0.10.40
Bundle the app on my dev box, and unpack it on the host
cd /app/programs/server
npm install
and I get
> fibers#1.0.5 install /opt/sapwfdashboard/programs/server/node_modules/fibers
> node ./build.js
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
internal/child_process.js:298
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:870:11)
at ChildProcess.spawn (internal/child_process.js:298:11)
at Object.exports.spawn (child_process.js:362:9)
at build (/opt/sapwfdashboard/programs/server/node_modules/fibers/build.js:55:5)
at Object.<anonymous> (/opt/sapwfdashboard/programs/server/node_modules/fibers/build.js:47:3)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
npm ERR! fibers#1.0.5 install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#1.0.5 install script.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.0-109-generic
npm ERR! command "/root/.nvm/v0.10.40/bin/node" "/root/.nvm/v0.10.40/bin/npm" "install"
npm ERR! cwd /opt/sapwfdashboard/programs/server
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I'm stuck. Any idea how to get around this. I am going to have to upgrade this app as the initial deployments are just impossible now.
The best way I've found to deploy this is to use mupc to set up the instances, and then use the manual deployment process from there onwards.
I'm still to work out what the differences are.

Google Firebase functions ImageMagick thumbnail creation failing

I am working on google firebase functions to generate thumbnails for images using imagemagic, I did exactly what is mentioned in this link
and also I have gone through this link.
I am getting the following exception while deploying using gcloud app deploy command. I have gone through other SO posts(link) which are similar to this issue.
I also have updated firebase tools using (npm install -g firebase-tools). is anything else I am missing ?
In the exception is says
at Object. (/app/lib/functions.js:43:47) at line number 43 the code snippet looks like this
exports.generateThumbnail = functions.storage.object().onChange(event => {
Exception looks as follows
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
> nodejs-getting-started#1.0.0 start /app
> node app.js
/app/node_modules/firebase-functions/lib/config.js:51
throw new Error('Firebase config variables are not available. ' +
^
Error: Firebase config variables are not available. Please use the latest version of the Firebase CLI to deploy this function.
at init (/app/node_modules/firebase-functions/lib/config.js:51:15)
at Object.config (/app/node_modules/firebase-functions/lib/config.js:29:9)
at Object.object (/app/node_modules/firebase-functions/lib/providers/storage.js:41:27)
at Object.<anonymous> (/app/lib/functions.js:43:47)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! nodejs-getting-started#1.0.0 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-getting-started#1.0.0 start script 'node app.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nodejs-getting-started package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nodejs-getting-started
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nodejs-getting-started
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log

React-Starterify Project on Windows computer, babel not working

I've just recently started to learn how to use the React framework and have been following the LevelUpTuts channel on youtube. In video 7 of their React playlist, they use this (I guess boilerplate) project called React-Starterify. He made it look easy installing it on his Mac, however I'm on windows and it is becoming a complete nightmare. Here is the project:
https://github.com/Granze/react-starterify
I've followed the exact steps, however when I do the whole "npm run watch".
> react-starterify#2.1.3 watch K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4
> gulp watch
[13:40:11] Requiring external module babel-core/register
K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4\gulpfile.babel.js:108
var opts = Object.assign({}, _watchify2.default.args, customOpts);
^
TypeError: undefined is not a function
at Object.<anonymous> (gulpfile.babel.js:39:21)
at Module._compile (module.js:460:26)
at loader (K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4\node_modules\babel-core\node_modules\babel-register\lib\node.js:130:5)
at Object.require.extensions.(anonymous function) [as .js] (K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4\node_modules\babe
l-core\node_modules\babel-register\lib\node.js:140:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Liftoff.handleArguments (K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4\node_modules\gulp\bin\gulp.js:116:3)
at Liftoff.<anonymous> (K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4\node_modules\gulp\node_modules\liftoff\index.js:192:16)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! react-starterify#2.1.3 watch: `gulp watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-starterify#2.1.3 watch script 'gulp watch'.
npm ERR! This is most likely a problem with the react-starterify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp watch
npm ERR! You can get their info via:
npm ERR! npm owner ls react-starterify
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! K:\IT Projects\ReactTutes\MailingList\react-starterify-2.1.4\npm-debug.log
I've tried updating gulp and babel, with the same results.
Gulp CLI and Local versions are 3.9.0.
I looks like it's complaining about something with Windows. Has anyone had any luck getting their Windows machine working with the project?
If not, can anyone recomment another starter project for React, for beginners?
I haven't used react-starterify, but I have used a site called http://www.overreact.io/ It allows you to draw out your components and then download all of your starter files including a server/gulp. I know for windows you would have to download the zip file, since the npm package doesn't work at the moment, but I have used the zip and it works. Hope that helps!

socket.io - not able to install

I have to install socket.io in corporate network. Please find below the values set in .npmrc.
proxy = http://xxx.xx.xx.xxx:8080
https-proxy = http://xxx.xx.xx.xxx:8080
registry = http://registry.npmjs.org/
strict-ssl = false
I've installed express, grunt and bower with same settings. When I execute npm install socket.io, I am getting below error.
npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f
2.tar.gz
npm http GET https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
npm ERR! fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f
2.tar.gz
unbuild engine.io-client#1.5.2
unbuild socket.io-client#1.3.6
unbuild socket.io#1.3.6
npm ERR! Error: tunneling socket could not be established, cause=Parse Error
npm ERR! at ClientRequest.onError (C:\Program Files\nodejs\node_modules\npm\
node_modules\request\node_modules\tunnel-agent\index.js:159:17)
npm ERR! at ClientRequest.g (events.js:175:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:95:17)
npm ERR! at Socket.socketOnData (http.js:1569:9)
npm ERR! at TCP.onread (net.js:525:27)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io"
npm ERR! cwd C:\Users\xxx\Socket_POC
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! code ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\xxx\Socket_POC\npm-debug.log
npm ERR! not ok code 0
I couldn't figure out why is it going to github to fetch the data.
Still I tried to run below code of index.js with node and getting an error:
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
/*app.get('/', function(req, res){
res.send('<h1>Hello world</h1>');
});*/
app.get('/', function(req, res){
res.sendFile(__dirname + '/index.html');
});
http.listen(3000, function(){
console.log('listening on *:3000');
});
error:
module.js:340
throw err;
^
Error: Cannot find module 'engine.io'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\xxx\node_modules\socket.io\lib\index.js
:9:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Even I installed engine.io but still couldn't able to install socket.io.
How to resolve this issue with socket.io installation ???
engine.io-client, a dependency, is pulling a version of XMLHttpRequest directly from github.com not the npm registry. Is your corporate proxy blocking you from downloading stuff on github?
If so, you won't be able to install until they merge and push this branch of XMLHttpRequest to the npm registry.
I see it's old question, but I've just stumbled on the same thing.
If you really need to use this version of socket.io (update of the socket.io would simply solve it since it uses newer version of engine.io-client).
There is one way to override internal dependencies. You can use npm shrinkwrap.
You define file called npm-shrinkwrap.json and inside define that your dependency (in your case socket.io) uses different internal dependency(in your case engine.io-client).
{
"name": "<your_package>",
"version": "<your_package_version>",
"dependencies": {
"socket.io": {
"version": "1.5.2",
"from": "socket.io#1.5.2",
"dependencies": {
"engine.io-client": {
"version": "1.6.4", //this one does not have issue with external download
"from": "engine.io-client#1.6.4"
}
}
}
}
}
Also, make sure that inside your package.json you put
"engine.io-client" : 1.6.4

Resources