You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
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.
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 findfs
andchild_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:
The text was updated successfully, but these errors were encountered: