Git Product home page Git Product logo

Comments (10)

pasupulaphani avatar pasupulaphani commented on July 18, 2024

same issue. Any solution?

from apnagent.

ExploreMqt avatar ExploreMqt commented on July 18, 2024

I can't say that I've tried OpenShift, but I've been using Heroku without
any issues for a few months.
Can you post some example code on how you construct your agent object?

On Tue, Oct 13, 2015 at 8:53 PM, Phaninder Pasupula <
[email protected]> wrote:

same issue. Any solution?


Reply to this email directly or view it on GitHub
#35 (comment)
.

from apnagent.

rahul-lohra avatar rahul-lohra commented on July 18, 2024

same issue, Exactly same error activating gear

from apnagent.

ajostergaard avatar ajostergaard commented on July 18, 2024

This might help: https://developers.openshift.com/en/node-js-environment-variables.html

from apnagent.

rahul-lohra avatar rahul-lohra commented on July 18, 2024

Thank you @ajostergaard for quick reply , i have tried your solution it is working perfectly . But when i include package body-parser and morgan , it results the same error

my code:
var express = require('express');
var bodyParser=require('body-Parser');
var morgan=require('morgan');
var app = express();
var http = require('http');

app.use(bodyParser.urlencoded({extended:true}));
app.use(bodyParser.json());
app.use(morgan('dev'));

app.get('/', function (req, res) {
res.send('Hello World!');
});

var ipaddress = process.env.OPENSHIFT_NODEJS_IP;
var port = process.env.OPENSHIFT_NODEJS_PORT;
if(typeof ipaddress === "undefined"){
ipaddress = "127.0.0.1";
port = 3000;
}
app.listen(port, ipaddress, function() {
// Do your stuff
console.log("Your server is running on: "+ipaddress+" port:"+port);
});

if i comment out all the packages excluding express, it works fine ...

from apnagent.

ajostergaard avatar ajostergaard commented on July 18, 2024

@IAMDANGEROUS I suggest making sure it works locally before trying it on openshift however clearly not an apnagent issue.

@kommancs96 i suggest closing this issue.

from apnagent.

rahul-lohra avatar rahul-lohra commented on July 18, 2024

well its working 100% fine in local machine, please look at this post (the answer) , i want to know is there any to use node version 0.12.X , i mean the latest version in server side (on openshift), i think may be node 0.10 (running on openshift) doesn't support latest packages, thats why i am this issue

from apnagent.

ajostergaard avatar ajostergaard commented on July 18, 2024

Be that as it may this has nothing to do with apnagent.

Have you tried node 10 on your local machine?

from apnagent.

rahul-lohra avatar rahul-lohra commented on July 18, 2024

@ajostergaard thanks for keeping patience , and helping me everytime, i am an idiot, i was ignoring it all the time ,it was my silly mistake my 2nd line of code -->var bodyParser=require('body-Parser');<-- this was creating issue, i was importing wrong package all the time the package should be 'body-parser' (case-sensitive) ..
Now , everything is working fine locally and remotely . Again thanks for your help .

from apnagent.

srvsud avatar srvsud commented on July 18, 2024

most of the times this issue occurs because of the error in scripts or compilation silly human errors :)

from apnagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.