Angular 6 many Can't resolve errors (crypto, fs, http, https, net, path, stream, tls, zlib)

后端 未结 8 2070
暖寄归人
暖寄归人 2020-11-28 05:56

I\'m building an Angular 6 app, but every time I want to serve to localhost, I get these errors:

ERROR in ./node_modules/aws-sign2/index.js
Module not found         


        
相关标签:
8条回答
  • 2020-11-28 06:35

    Use ngx-build-plus package - https://github.com/manfredsteyer/ngx-build-plus - and provide the additional configuration. This way you don't have to manually update the node modules files everytime you do an install.

    0 讨论(0)
  • 2020-11-28 06:35

    You have to find the node packages added as dependencies which is causing this issue. Open package-lock.json, search for crypto can find the chain of dependencies leading to the package name included in dependencies section of package.json. In my case, most of these libraries were brought in with npm package 'request'.

    0 讨论(0)
提交回复
热议问题