I am looking to integrate the google closure library into my angular 6 application. To achieve this, I have utilized the following commands:
npm install google-closure-compiler
and npm install google-closure-library
.
My application can be successfully compiled and run. However, upon attempting to execute the tests using ng test
, I encountered error messages:
ERROR in ./node_modules/google-closure-library/closure/goog/bootstrap/nodejs.js
Module not found: Error: Can't resolve 'fs' in './node_modules/google-closure-library/closure/goog/bootstrap'
ERROR in ./node_modules/google-closure-library/closure/goog/promise/testsuiteadapter.js
Module not found: Error: Can't resolve 'promises_aplus_tests' in './node_modules/google-closure-library/closure/goog/promise/testsuiteadapter.js'
I followed the angular official demo example and simply added the tests along with installing these two libraries. It seems like I may need to configure the karma.conf.js
, but I'm unsure how to proceed. Can anyone provide guidance on resolving this issue?