I am trying to write an Angular2 app in nwjs, which among other things exposes the Nodejs process variable. What I am finding is that SOMETHING is overwriting the process variable with an empty process object, and I cannot find what it is.
console.log(JSON.stringify(process.version)); console.log(JSON.stringify(global.process.version)); console.log(JSON.stringify(window.process.version)); I put the above code in index.html and its displays the same value 3 times. "v9.3.0" "v9.3.0" "v9.3.0" I did the same thing in the initialization function of app.component.ts and the first displays empty string. "" "v9.3.0" "v9.3.0" Unfortunately when a dependent node_module calls *process*, its does it like in the first call, so even though I can get around it in MY code, I don't know how to make it work on node_module objects I am dependent on. So I know the variable was there when document is ready, but I cannot access it correctly from a component or service, which means neither can the tree of node_module depedencies. n Can someone help me understand what is going on? -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
