Sendbird SDK not working with React Native

I am following sendbird‘s tutorial on building a chat app with react-native, and i get the following error when I try to import sendbird sdk: Unable to resolve module http from …/SendbirdSample/node_modules/sendbird/SendBird.min.js: Unable to find this module in its module map or any of the node_modules/http and its parent directories I deleted node_modules folder and […]

Docker HTTP-requests between containers

I’m at the first stage in learning how to use Docker so I’m trying basic things. I’ve created two Node Express services that need to exchange data via HTTP-requests. My docker-compose.yml file networks: isolation-network: driver: bridge services: service1-nodejs: build: context: ./service1/ dockerfile: .docker/node.dockerfile ports: – “10000:9000” – “10001:5858” env_file: ./service1/.docker/env/app.${APP_ENV}.env networks: – isolation-network service2-nodejs: build: […]

child_process exits with code null

I am running my node server in centos6.X, and forking a child process. var cp = require(‘child_process’); child = cp.fork(__dirname+’/worker’); child.on(‘exit’, function (code, signal) { console.log(‘Child exited with code = ‘ +code+’ signal = ‘+signal); }); but after few seconds I get this error Child exited with code = null signal = SIGKILL I am […]

Socket hang-up using neo4j JS driver

all. I’m new to neo4j and trying to use the official JS driver from node / express to hit a remote (e.g. non-local) server, but keep getting [Error: socket hang up] code: ‘ECONNRESET’ errors. Code looks like this: router.get(‘/’, function(req, res, next) { var driver = neo4j.driver(“bolt://ip.address”, neo4j.auth.basic(“neo4j”, “neo4j”)); var session = driver.session(); var query […]

Node.js, multer and req.body empty

Here it is my problem, I have a form where I can insert a file and a field but I receive only the file and not the parameter test! Why? This is my code: app.js: var express = require(‘express’); var bodyParser = require(‘body-parser’); var app = express(); var port = 8000; var multer = require(‘multer’); […]

Multiple NodeJS Services/Modules on Google App Engine Flexible Environment

I’m struggling to figure out how to deploy multiple nodejs services on google app engine flexible. I’m using multiple nodejs classes with firebase-queue to process my tasks. Right now, i’m using my package.json to trigger starting everything at once. However, this has become problematic. I would like to be able to push a change to […]

Usage of Bearer Tokens in https request

I’m trying to connect to an API using ‘auth’ in the options. Currently it looks like this: var options = { hostname: ‘<name of site>’, port: 443, path: ‘<path>’, auth:’Bearer <Token>’, method: ‘GET’ }; However, I get Status Code 403 if I execute the request. When I put the following URL in the browser, it […]

Google Container Engine (Kubernetes): Websocket (Socket.io) not working on multiple replicas

I am new to Google Container Engine (GKE). When run on localhost it’s working fine but when I deploy to production with GKE I got websocket error. My node app is develop with Hapi.js and Socket.io and my structure is shown in image below. Application Architecture I’m using Glue to compose Hapi server. Below is […]

Passing variables from NPM Scripts to Webpack

I have a production build with Webpack that uses node’s process.env to set environment variables: webpack.prod.babel.js: const DefinePlugin = new webpack.DefinePlugin({ ‘process.env’: { NODE_ENV: JSON.stringify(‘production’), API_URL: JSON.stringify(‘https://myprodurl.com’), }, }); packge.json: “scripts: { “build:prod”: “webpack” } It’s working fine, but I need something different. I need to set the production url as variable in the NPM […]

Nodejs application SyntaxError: Unexpected reserved word 'class'

i am new to node just started an application using eclipse and nodeclipse plug-ins.when i run the app using node core.js it works fine but using eclipse it shows me following error. /home/sarojs/projects/Core/security.js:3 class Security { ^^^^^ SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load […]

Node.js is the Best Javascript runtime in the world.