question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when flattening the source-map of angular-instantsearch with ngcc (angular 9)

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:28 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
lodi-gcommented, Apr 27, 2020

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:

Error: Error when flattening the source-map "/tmp/ais-bug/node_modules/angular-instantsearch/bundles/angular-instantsearch.umd.js.map" for "/tmp/ais-bug/node_modules/angular-instantsearch/bundles/angular-instantsearch.umd.js": TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null

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.

2reactions
MiguelAngelGarciaGomezcommented, Feb 18, 2022

I have tried with Angular 13 and it seems to work. I’ve tried:

npx @angular/cli@13.0.0 new project
cd project
npm i --save angular-instantsearch@latest
npx ngcc

Ant result is:

Warning: Entry point 'angular-instantsearch' contains deep imports into '/private/tmp/project/node_modules/instantsearch.js/es/connectors', '/private/tmp/project/node_modules/instantsearch.js/es/widgets/index/index', '/private/tmp/project/node_modules/querystring-es3/encode', '/private/tmp/project/node_modules/instantsearch.js/es/types', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/breadcrumb/connectBreadcrumb', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/clear-refinements/connectClearRefinements', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/configure-related-items/connectConfigureRelatedItems', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/configure/connectConfigure', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/current-refinements/connectCurrentRefinements', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/hierarchical-menu/connectHierarchicalMenu', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/hits-per-page/connectHitsPerPage', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/hits/connectHits', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/infinite-hits/connectInfiniteHits', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/menu/connectMenu', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/numeric-menu/connectNumericMenu', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/pagination/connectPagination', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/query-rules/connectQueryRules', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/range/connectRange', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/rating-menu/connectRatingMenu', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/refinement-list/connectRefinementList', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/search-box/connectSearchBox', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/sort-by/connectSortBy', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/stats/connectStats', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/toggle-refinement/connectToggleRefinement', '/private/tmp/project/node_modules/instantsearch.js/es/connectors/voice-search/connectVoiceSearch'. This is probably not a problem, but may cause the compilation of entry points to be out of order.

Can this warning cause some problems? I have an Angular 13 application, with this dependency, and it’s throwing a JIT compiler unavailableerror that I’m not sure whether is related to this warning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Unable to fully load /node_modules/ag-grid-angular ...
I am using ag-grid-community version 22.1.0. Warning: Unable to fully load /node_modules/ag-grid-angular/main.js for source-map flattening:Ā ...
Read more >
Error when update angular-instantsearch to v4 and angular ...
Hi there! I had a working version of angular-instantsearch v3 on angular 9, try to update to angular 11 and for that also...
Read more >
NG6999: Invalid @NgModule() metadata - Angular
This error represents the import or export of an @NgModule() that doesn't have valid metadata. ... The library might have been processed with...
Read more >
JavaScript Debugging with Sourcemaps - TrackJS
With the proliferation of JavaScript transpilers, sourcemaps have become an integral part of the front-end development. If you're using Angular 2, React,Ā ...
Read more >
What's new with Angular 9? - AnAr Solutions Pvt. Ltd.
In earlier version, it just prompted an error but now you can completely automate cleaning of outdated artifacts from a whole package using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found