Hi Team,
I keep getting errors when I integrate "@looker/sdk-node" versions with Angular and then start server.
took reference from Looker Github project:
https://github.com/looker-open-source/sdk-codegen/tree/fb19b8f45078aa4b6a7f91bf817c48418b19ffae/exam...
sample project with errors are attached in below:
https://stackblitz.com/edit/angular-od7a4u?file=package.json,src%2Fmain.ts
--ERROR:-- in console
./node_modules/@looker/sdk-node/lib/nodeSettings.js:7:33-46 - Error: Module not found: Error: Can't resolve 'fs' in 'C:\DDrive\Web\looker-test\node_modules\@looker\sdk-node\lib'
./node_modules/@looker/sdk-node/lib/nodeTransport.js:7:37-54 - Error: Module not found: Error: Can't resolve 'crypto' in 'C:\DDrive\Web\looker-test\node_modules\@looker\sdk-node\lib'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
./node_modules/asn1/lib/ber/reader.js:3:13-30 - Error: Module not found: Error: Can't resolve 'assert' in 'C:\DDrive\Web\looker-test\node_modules\asn1\lib\ber'