0x.js v2 with angular 6


#1

Please im trying to implement 0x.js v2 with angular 6. I create a angular cli project, next i copy package.json from v2 repository here https://github.com/0xProject/0x-monorepo, but im getting this error after npm install:
/*

ERROR in ./node_modules/hdkey/lib/hdkey.js

Module not found: Error: Can’t resolve ‘crypto’ in ‘/home/jaime/Escritorio/0x/cero-equis-tutorial/node_modules/hdkey/lib’

ERROR in ./node_modules/cipher-base/index.js

Module not found: Error: Can’t resolve ‘stream’ in ‘/home/jaime/Escritorio/0x/cero-equis-tutorial/node_modules/cipher-base’

ERROR in ./node_modules/hash-base/index.js

Module not found: Error: Can’t resolve ‘stream’ in ‘/home/jaime/Escritorio/0x/cero-equis-tutorial/node_modules/hash-base’

ERROR in ./node_modules/keccak/lib/api/shake.js

Module not found: Error: Can’t resolve ‘stream’ in ‘/home/jaime/Escritorio/0x/cero-equis-tutorial/node_modules/keccak/lib/api’

ERROR in ./node_modules/keccak/lib/api/keccak.js

Module not found: Error: Can’t resolve ‘stream’ in ‘/home/jaime/Escritorio/0x/cero-equis-tutorial/node_modules/keccak/lib/api’

:information_source: 「wdm」: Failed to compile.

*/

Anyone can help me please in this implementation.
my respects for all…


#2

There was another project who was having similar issues with Angular 6. It looks like they have a webpack config inside angular which is stripping out the crypto module. See these related github issues for a few work arounds: