Since I deployed a new version of my Node.js application the ‘process’ object seems to be undefined:
ReferenceError: process is not defined
at Object.<anonymous> (/usr/src/app/app.js:15:11)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
I can’t see any change in my application which could have caused this issue. start script in package.json is ‘node app.js’. I’m using the process object to read the environment variables.
Does anybody know what could have caused this issue?
Hey Yamini, process is a global variable in nodeJs, if you have instantiated a similar named variable/function in your code then you should rename that, it doesn’t matter what you rename it to.
Hey, I don’t know if any of you will be doing something stupid like me. But still, I am sharing this here. I came to this page because of the same issue. But later I found out that my mistake was using a capital P ‘Process’ instead of ‘process’. So checkout one again may you have the same issue.