fresc81 / node-winreg

node module that provides access to the Windows Registry through the REG commandline tool
210 stars 61 forks source link

@angular/cli #41

Closed qisbic closed 7 years ago

qisbic commented 7 years ago

ERROR in ./~/winreg/lib/registry.js Module not found: Error: Can't resolve 'child_process' in 'c:\Project\machine\node_modules\winreg\lib'

on a cleaned project in angular 2.

var Registry = require('winreg');

fresc81 commented 7 years ago

Didn't even know that CLI tool for Angular. But I know Angular, and it's running in web browsers only. I think the CLI tool is written for use with Node.js and generates Angular-based projects that run in the browser. The scope of this module is just Node.js, it won't run in the browser and it won't allow you to access the Windows registry from within the browser. But you could use something like this: http://docs.nwjs.io/en/latest/For%20Users/Getting%20Started/ to get stuff from both worlds (browser and Node.js) working together.