Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhihuilai opened this issue Sep 23, 2018 · 1 comment
Open

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

zhihuilai opened this issue Sep 23, 2018 · 1 comment

Comments

@zhihuilai
Copy link

zhihuilai commented Sep 23, 2018

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 zhihuilai changed the title process.evn、process.env.NODE_ENV exist,bug detect result is false process.env.NODE_ENV exist,bug detect result is false Sep 23, 2018
@zhihuilai zhihuilai changed the title process.env.NODE_ENV exist,bug detect result is false process.env.NODE_ENV exist,but detect result is false Sep 23, 2018
@iliakan
Copy link
Owner

iliakan commented Sep 23, 2018

Strange, I'm getting true ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants