re-base
re-base copied to clipboard
Webpack errors when using with next js
Using rebase along with nextJS gives a webpack error on build:
Failed to compile.
./node_modules/@firebase/database/dist/index.node.cjs.js
Module not found: Can't resolve 'request' in '/Users/.../node_modules/@firebase/database/dist'
> Build error occurred
Error: > Build failed because of webpack errors
at Object.build [as default] (/Users/.../node_modules/next/dist/build/index.js:192:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
Reproduce error:
- Go to (repo and clone)[https://github.com/billcastillo/next-page3]
- Run npm install
- Run npm run build or next build
- See error
Although it runs fine locally:
- Run npm run dev
- Go to http://localhost:3000
any word on this? i'm getting the same error on a project right now, although not using firebase.
for my back end, my api routes use sql-template-strings and serverless-mysql.
everything runs fine locally and fails on build at that same '....next_tick.js/68:7'