-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions are missing from localForage after updating Angular to latest version #55503
Comments
This is due to the namespace import, use a default import instead. - import * as localforage from 'localforage';
+ import localforage from 'localforage'; More information about this can be found evanw/esbuild#532 |
Thanks for the quick response! It's good to see that JavaScript bundlers/compliers are trying to handle code consistently Initially when making the update to my application I was getting an error telling me to enable After reading https://www.typescriptlang.org/tsconfig/#esModuleInterop there is a note at the bottom which I think helps explain the issue I had encountered:
The |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
compiler, Don't known / other
Is this a regression?
Yes
Description
I have an Angular 17.1.2 application that is using localForage without any issues.
Today I updated the version of Angular to 17.3.5 (no other changes) and now when I call
config
on localForage it is throwingUncaught TypeError: localForage.config is not a function
. The package version for localForage is still exactly the same so it appears as though the Angular update has caused the issue.As an alternative I tried calling
createInstance
and using that instance in my code but it is also throwing the same exception.The functionality of localForage still works as expected if I remove the call to
config
, it just has the default configuration instead of the customised name and storeName which I was setting previously.I created a stack blitz to determine if it was an issue in my code and it also throws the same exceptions. The stack blitz is using Angular 17.2.0 so it appears that the issue originates between 17.1.2 and 17.2.0.
https://stackblitz.com/edit/stackblitz-starters-maotxh?file=src%2Fmain.ts
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-maotxh?file=src%2Fmain.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: