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

fs and child_process not found #46

Open
paddotk opened this issue Jun 16, 2020 · 2 comments
Open

fs and child_process not found #46

paddotk opened this issue Jun 16, 2020 · 2 comments

Comments

@paddotk
Copy link

paddotk commented Jun 16, 2020

I've successfully installed the package. When I try to run my app with an import of exec from the package, npm fails to build because it cannot find fs and child_process.

The app is an Angular one and I'm trying to import the package in the main.ts file in the root of the project.

The exact errors:

ERROR in ./node_modules/child-process-promise/lib/index.js
Module not found: Error: Can't resolve 'child_process' in 'my_project\node_modules\child-process-promise\lib'
ERROR in ./node_modules/child-process-promise/lib-es5/index.js
Module not found: Error: Can't resolve 'child_process' in 'my_project\node_modules\child-process-promise\lib-es5'
ERROR in ./node_modules/child-process-promise/node_modules/cross-spawn/index.js
Module not found: Error: Can't resolve 'child_process' in 'my_project\node_modules\child-process-promise\node_modules\cross-spawn'
ERROR in ./node_modules/child-process-promise/node_modules/cross-spawn/lib/parse.js
Module not found: Error: Can't resolve 'fs' in 'my_project\node_modules\child-process-promise\node_modules\cross-spawn\lib'
ERROR in ./node_modules/isexe/index.js
Module not found: Error: Can't resolve 'fs' in 'my_project\node_modules\isexe'
ERROR in ./node_modules/isexe/mode.js
Module not found: Error: Can't resolve 'fs' in 'my_project\node_modules\isexe'
ERROR in ./node_modules/isexe/windows.js
Module not found: Error: Can't resolve 'fs' in 'my_project\node_modules\isexe' 
@BumpyBill
Copy link

You do not need to install them. They are built into node.

@sonu-drip
Copy link

child_process comes from the node environment. Normally Angular is using webpack and targeting browser clients and it can not be used. Not sure what's the use case you have.

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

3 participants