I am building a react app with firebase library v7.15.5 and when I'm importing 'firebase/auth', it works fine but it throws me warnings in a terminal:
WARNING in ./node_modules/@firebase/auth/dist/auth.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:es6\promise\promise] ' file: Error: ENOENT: no such file or directory, open 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:es6\promise\promise] '
@ ./node_modules/firebase/auth/dist/index.esm.js 1:0-24
@ ./src/utils/firebase/firebase.ts
@ ./src/store/actions/appProps/index.ts
@ ./src/pages/schedule/index.tsx
@ ./src/components/app/index.tsx
@ ./src/index.tsx
@ multi ./src/index.tsx
WARNING in ./node_modules/@firebase/auth/dist/auth.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:es6\util\arrayiterator] ' file: Error: ENOENT: no such file or directory, open 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:es6\util\arrayiterator] '
@ ./node_modules/firebase/auth/dist/index.esm.js 1:0-24
@ ./src/utils/firebase/firebase.ts
@ ./src/store/actions/appProps/index.ts
@ ./src/pages/schedule/index.tsx
@ ./src/components/app/index.tsx
@ ./src/index.tsx
@ multi ./src/index.tsx
WARNING in ./node_modules/@firebase/auth/dist/auth.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:es6\util\makeiterator] ' file: Error: ENOENT: no such file or directory, open 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:es6\util\makeiterator] '
@ ./node_modules/firebase/auth/dist/index.esm.js 1:0-24
@ ./src/utils/firebase/firebase.ts
@ ./src/store/actions/appProps/index.ts
@ ./src/pages/schedule/index.tsx
@ ./src/components/app/index.tsx
@ ./src/index.tsx
@ multi ./src/index.tsx
WARNING in ./node_modules/@firebase/auth/dist/auth.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:util\defineproperty] ' file: Error: ENOENT: no such file or directory, open 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:util\defineproperty] '
@ ./node_modules/firebase/auth/dist/index.esm.js 1:0-24
@ ./src/utils/firebase/firebase.ts
@ ./src/store/actions/appProps/index.ts
@ ./src/pages/schedule/index.tsx
@ ./src/components/app/index.tsx
@ ./src/index.tsx
@ multi ./src/index.tsx
WARNING in ./node_modules/@firebase/auth/dist/auth.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:util\global] ' file: Error: ENOENT: no such file or directory, open 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:util\global] '
@ ./node_modules/firebase/auth/dist/index.esm.js 1:0-24
@ ./src/utils/firebase/firebase.ts
@ ./src/store/actions/appProps/index.ts
@ ./src/pages/schedule/index.tsx
@ ./src/components/app/index.tsx
@ ./src/index.tsx
@ multi ./src/index.tsx
WARNING in ./node_modules/@firebase/auth/dist/auth.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:util\polyfill] ' file: Error: ENOENT: no such file or directory, open 'D:\Projects\DeparturesSchedule\node_modules\@firebase\auth\dist\ [synthetic:util\polyfill] '
@ ./node_modules/firebase/auth/dist/index.esm.js 1:0-24
@ ./src/utils/firebase/firebase.ts
@ ./src/store/actions/appProps/index.ts
@ ./src/pages/schedule/index.tsx
@ ./src/components/app/index.tsx
@ ./src/index.tsx
@ multi ./src/index.tsx
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
4 modules
i 「wdm」: Compiled with warnings.
This is the code of the file, where I initialize firebase modules:
import app from 'firebase/app';
import 'firebase/database';
import 'firebase/auth';
const config = {
apiKey: process.env.API_KEY,
authDomain: process.env.AUTH_DOMAIN,
databaseURL: process.env.DB_URL,
storageBucket: process.env.STORAGE_BUCKET,
};
app.initializeApp(config);
const database = app.database();
const auth = app.auth();
export { database, auth };
Tried to remove node_modules and reinstall all, but it doesn't solve the problem. Maybe I should import it in a different way or configure webpack or tsconfig? I don't know.
Thanks for help.