re-base icon indicating copy to clipboard operation
re-base copied to clipboard

Webpack errors when using with next js

Open billcastillo opened this issue 5 years ago • 1 comments

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:

  1. Go to (repo and clone)[https://github.com/billcastillo/next-page3]
  2. Run npm install
  3. Run npm run build or next build
  4. See error

Although it runs fine locally:

  1. Run npm run dev
  2. Go to http://localhost:3000

billcastillo avatar Apr 30 '19 07:04 billcastillo

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'

colemahatmccreary avatar Jul 25 '19 19:07 colemahatmccreary