Open shutallbridge opened 1 year ago
Found a similar issue here. Adding the encoding
package seems to resolve this issue.
yarn add encoding
The warning messages have disappeared both in next dev
and next build
, but this doesn't explain why this warning occurs only in the app directory...
Here's the link to a new branch that uses this fix
i also faced the same warning while using pnpm 8.6
, also fixed by adding the encoding
library as a dev dependency.
this problem probably isn't related to the package manager 👀
Same here. Running npm i encoding
fixed the issue.
package.json
dependencies:
"dependencies": {
"@headlessui/react": "^1.7.4",
"@heroicons/react": "^2.0.13",
"@tailwindcss/forms": "^0.5.3",
"@types/node": "18.16.1",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.1",
"autoprefixer": "10.4.14",
"encoding": "^0.1.13",
"eslint": "8.39.0",
"eslint-config-next": "13.3.1",
"firebase": "^9.22.2",
"firebaseui": "^6.0.2",
"mongodb": "5.0",
"next": "13.3.1",
"postcss": "8.4.23",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.2",
"typescript": "5.0.4"
}
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://github.com/ShuHighBridge/issue-firebase-app-dir
To Reproduce
In the reproduction app, the Firebase emulator is used to make reproducing this issue easier.
Fore more information on how to install the Firebase CLI, visit the Firebase CLI reference
Describe the Bug
This warning is given both with
next dev
andnext build
. Firebase seems to function properly at least when tested with Firebase Authentication and Firestore in both development and build. However, this module resolution issue is worrying as it may cause other unforeseen issues...This warning does not occur when Firebase SDK is used inside the
pages
directory.Expected Behavior
No warning should be given in both
next dev
andnext build
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response