2

I am trying to build using command npm run build:ssr for my Angular application. Application built successfully done, But at the time of running command npm run serve:ssr I'm getting this error -

ReferenceError: IDBIndex is not defined

PS: As per my finding issue is with firebase package I am using. I wrapped the whole content under the check if (isPlatformBrowser(this.platform)) {} but still getting error.

Probably this line of import

import { openDb, deleteDb } from 'idb';

is causing issue, can anyone help. Do I need to import idb dynamically?

PPS: I have already check this answer but not working for me

1

1 Answer 1

1

Try updating the firebase package to the latest version. ( Not AngularFire)

npm i [email protected]

[ First remove firebase from package.json and run npm i . Check your package.lock.json to ensure that it is also deleted from there- if not manually delete].

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.