-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Description
Bug report
Describe the bug
Build fails when importing Firestore
and using target: 'serverless'
even after upgrading next
to at least version 9.0.4 as mentioned here: #6073 (comment).
Module not found: Can't resolve 'memcpy' in '.../node_modules/bytebuffer/dist'
To Reproduce
- package.json:
"dependencies": {
"firebase": "^6.5.0",
"next": "^9.0.5",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
- firebase.js:
import firebase from 'firebase/app';
import 'firebase/firestore';
const config = {
...
};
const firebaseApp = !firebase.apps.length
? firebase.initializeApp(config)
: firebase.app();
const firestore = firebaseApp.firestore();
export default firebaseApp;
export { firestore };
- next.config.js:
module.exports = {
target: 'serverless',
};
Expected behavior
Build should succeed.
Screenshots
System information
- Version of Next.js: 9.0.5
- Version of firebase: 6.5.0
Additional context
It works on local next dev
.
Metadata
Metadata
Assignees
Labels
No labels