Error: Cannot Read Property Of Undefined
I'm trying to configure my app using Express like the following way, but I'm getting errors on doing that: server.js var express = require('express'); var env = process.env.NODE_EN
Solution 1:
Assuming you aren't setting process.env.NODE_ENV
and it's using the default value, then your problem here is a simple spelling mistake
process.env.NODE_ENV || 'devleopment';
should be
process.env.NODE_ENV || 'development';
Your config file doesn't export an object devleopment
hence why it returns undefined
.
Post a Comment for "Error: Cannot Read Property Of Undefined"