-
Notifications
You must be signed in to change notification settings - Fork 418
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
Breaks in Next.js 14: Can't resolve 'fs' #271
Comments
I had a similar issue which was do to my npm package.json. It should have the following "dependencies": {
"@google-cloud/firestore": "^6.7.0",
"firebase": "^10.3.1",
"firebase-admin": "^11.10.1",
"next": "^13.5.6",
"protobufjs": "^7.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"request": "^2.88.2"
},
"devDependencies": {
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"encoding": "^0.1.13"
},
"browser": {
"fs": false,
"os": false,
"path": false,
"child_process": false,
"net": false,
"tls": false
} insert those and run |
Thank you, @Grenghis-Khan! I've added this code to the end of my package.json file, and it's now working perfectly.
|
Does this example work in Next 14? |
requests is outdated. took firebase years to remove it fully so I'm surprised this is containing requests as a dependency |
This issue seems related to |
I tried upgrading this codelab to Next.js 14 and I get the following error:
./node_modules/@google-cloud/storage/build/src/bucket.js:21:11
Module not found: Can't resolve 'fs'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@google-cloud/storage/build/src/index.js
./node_modules/firebase-admin/lib/storage/storage.js
./node_modules/firebase-admin/lib/app/firebase-namespace.js
./node_modules/firebase-admin/lib/default-namespace.js
./node_modules/firebase-admin/lib/index.js
./src/lib/firebase/firebase.js
./src/lib/firebase/auth.js
./src/components/Header.jsx
The text was updated successfully, but these errors were encountered: