Skip to main content
added 820 characters in body
Source Link

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error. it said variable is not defined

but when i tried on my local it work just fine

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

it said variable is not defined

ReferenceError: string is not defined 13 at /app/dist/app.js:59:10 12 at /app/node_modules/amqplib/callback_api.js:15:23 11 at /app/node_modules/amqplib/lib/connect.js:154:9 10 at succeed (/app/node_modules/amqplib/lib/connection.js:283:5) 9 at onOpenOk (/app/node_modules/amqplib/lib/connection.js:262:5) 8 at /app/node_modules/amqplib/lib/connection.js:165:32 7 at /app/node_modules/amqplib/lib/connection.js:159:12 6 at Socket.recv (/app/node_modules/amqplib/lib/connection.js:507:12) 5 at Object.onceWrapper (events.js:420:28) 4 at Socket.emit (events.js:314:20) 3 at Socket.EventEmitter.emit (domain.js:483:12) 2 at emitReadable_ (_stream_readable.js:557:12) 1 at processTicksAndRejections (internal/process/task_queues.js:83:21)

here is my terminal on my local running

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error. it said variable is not defined

but when i tried on my local it work just fine

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error.

but when i tried on my local it work just fine

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

it said variable is not defined

ReferenceError: string is not defined 13 at /app/dist/app.js:59:10 12 at /app/node_modules/amqplib/callback_api.js:15:23 11 at /app/node_modules/amqplib/lib/connect.js:154:9 10 at succeed (/app/node_modules/amqplib/lib/connection.js:283:5) 9 at onOpenOk (/app/node_modules/amqplib/lib/connection.js:262:5) 8 at /app/node_modules/amqplib/lib/connection.js:165:32 7 at /app/node_modules/amqplib/lib/connection.js:159:12 6 at Socket.recv (/app/node_modules/amqplib/lib/connection.js:507:12) 5 at Object.onceWrapper (events.js:420:28) 4 at Socket.emit (events.js:314:20) 3 at Socket.EventEmitter.emit (domain.js:483:12) 2 at emitReadable_ (_stream_readable.js:557:12) 1 at processTicksAndRejections (internal/process/task_queues.js:83:21)

here is my terminal on my local running

added 1 character in body
Source Link

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error. it said variable is not defined

but when i tried on my local it work just fine

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error it said variable is not defined

but when i tried on my local it work just fine

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error. it said variable is not defined

but when i tried on my local it work just fine

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };
added 8 characters in body
Source Link

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error  it said variable is not defined   

but when i tried on my local it work just fine 

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an errorit said variable is not defined  but when i tried on my local it work just finehere is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error  it said variable is not defined 

but when i tried on my local it work just fine 

here is my terminal on my local running

const queue = {
    mobilize : 'test',
    mobileTurnOn: 'mobileTurnOn',
    pushAdminNotif: 'pushAdminNotif',
    diffLocationAlert: 'diffLocationAlert'
  };
  for ( string in queue) {
    console.log(string, "key")
    console.log(queue[string], "value")
  };
added 2 characters in body
Source Link
Tamir Abutbul
  • 7.7k
  • 8
  • 27
  • 61
Loading
Source Link
Loading