i'm getting start with both next.js and ReactQuill. But when i went run yarn build, this is what I get:
info Creating an optimized production build
- info Compiled successfully
- info Linting and checking validity of types
- info Collecting page data ..ReferenceError: document is not defined
at Object.<anonymous> (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:7661:12)
at __webpack_require__ (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:36:30)
at Object.<anonymous> (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:1030:1)
at __webpack_require__ (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:36:30)
at Object.<anonymous> (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:5655:14)
at __webpack_require__ (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:36:30)
at Object.<anonymous> (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:10045:13)
at __webpack_require__ (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:36:30)
at Object.<anonymous> (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:11557:18)
at __webpack_require__ (C:\Users\joao\Desktop\liceu\node_modules\quill\dist\quill.js:36:30)
> Build error occurred
Error: Failed to collect page data for /Articles
at C:\Users\joao\Desktop\liceu\node_modules\next\dist\build\utils.js:1152:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
How am I supposed to use that? I installed the packages, create the file under the pages folder. The file goes like this:
What am I imissing? How do I fix that?
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.