detect-node icon indicating copy to clipboard operation
detect-node copied to clipboard

process.env.NODE_ENV exist,but detect result is false

Open zhihuilai opened this issue 6 years ago • 1 comments

test js:

var detectNode = require('detect-node');
console.log('detectNode: ', detectNode, typeof global, typeof process, typeof process.env, process.env.NODE_ENV, Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0));

reuslt:

detectNode: false object object object development [object Object]

node -v: v8.10.0

npm -v: 5.6.0

os: windows 10

zhihuilai avatar Sep 23 '18 09:09 zhihuilai

Strange, I'm getting true ;)

iliakan avatar Sep 23 '18 09:09 iliakan