angular-instantsearch: Error when flattening the source-map of angular-instantsearch with ngcc (angular 9)
Describe the bug 🐛
We are currently trying to update our angular to the angular 9.0.5 version.
However, it looks like angular 9 is not able to compile the lib angular-instantsearch. Here are the logs:
❯ npx ngcc
Warning: Entry point 'angular-instantsearch' contains deep imports into './node_m
odules/algoliasearch/lite', './node_modules/instantsearch.js/es', './node_modules/instantsearch.js/es/connectors', './ngx-web/node_modules/a
lgoliasearch/index', './node_modules/querystring-es3/encode'. This is probably no
t a problem, but may cause the compilation of entry points to be out of order.
Compiling angular-instantsearch : fesm5 as esm5
Compiling angular-instantsearch : esm2015 as esm2015
Compiling angular-instantsearch : fesm2015 as esm2015
Compiling angular-instantsearch : esm5 as esm5
Compiling angular-instantsearch : main as umd
Error: Error when flattening the source-map "./node_modules/angular-instantsearch
/bundles/angular-instantsearch.umd.js.map" for "./node_modules/angular-instantsea
rch/bundles/angular-instantsearch.umd.js": TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
To Reproduce 🔍
Steps to reproduce the behavior:
npx @angular/cli@9.0.5 new project
cd project
npm i --save angular-instantsearch@latest
npx ngcc
Expected behavior 💭
The build pass.
Environment:
- OS: Mac OS Sierra
- Version: angular-instantsearch 2.3.0, angular 9.0.5
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 28 (13 by maintainers)
I don’t think you’re correctly following the steps mentioned:
git clone https://github.com/doliG/ais-bug && cd ais-bug && npm i
My complete log is here: https://hastebin.com/elotuboguz.coffeescript
On line 134:
I think you’ve missed the error because npm/yarn still output things after error’ing. Re-running ngcc will not throw an error though, and that’s why you didn’t see it.
I have tried with Angular 13 and it seems to work. I’ve tried:
Ant result is:
Can this warning cause some problems? I have an Angular 13 application, with this dependency, and it’s throwing a
JIT compiler unavailable
error that I’m not sure whether is related to this warning.Sorry @doliG, I haven’t yet found time for looking at this issue, I’ll put it first on my todo for tomorrow 😃