You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
i'm using useDropzone and got error "undefined is not a function" when build in nextjs 13.5
here is the error log:
Error occurred prerendering page "/regchannel". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: undefined is not a function
at Array.every ()
at D:\fpt\git\lily.next\server\chunks\4622.js:1:14868
at Array.filter ()
at D:\fpt\git\lily.next\server\chunks\4622.js:1:14572
at Object.nr [as useMemo] (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:27:35119)
at Module.t.useMemo (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:51:8206)
at de (D:\fpt\git\lily.next\server\chunks\4622.js:1:14494)
at Page (D:\fpt\git\lily.next\server\app(def)\regchannel\page.js:1:4746)
at nP (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:27:42286)
at nO (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:27:58995)
Describe the bug
i'm using useDropzone and got error "undefined is not a function" when build in nextjs 13.5
here is the error log:
Error occurred prerendering page "/regchannel". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: undefined is not a function
at Array.every ()
at D:\fpt\git\lily.next\server\chunks\4622.js:1:14868
at Array.filter ()
at D:\fpt\git\lily.next\server\chunks\4622.js:1:14572
at Object.nr [as useMemo] (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:27:35119)
at Module.t.useMemo (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:51:8206)
at de (D:\fpt\git\lily.next\server\chunks\4622.js:1:14494)
at Page (D:\fpt\git\lily.next\server\app(def)\regchannel\page.js:1:4746)
at nP (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:27:42286)
at nO (D:\fpt\git\lily\node_modules\next\dist\compiled\next-server\app-page-experimental.runtime.prod.js:27:58995)
here is the code: or use this link: https://github.com/kitsuneremi/lily/blob/main/app/testx/page.tsx
"use client";
import NextImage from "next/image";
import { useState, useCallback, useRef, useEffect } from "react";
import { useDropzone, Accept } from "react-dropzone";
import { PinturaEditorModal } from "@pqina/react-pintura";
import { uploadBytes, ref } from "firebase/storage";
import { storage } from "@/lib/firebase";
import Link from "next/link";
import { useToast } from "@/components/ui/use-toast";
import axios from "axios";
import { useSession } from "next-auth/react";
import { baseURL } from "@/lib/functional";
import "@pqina/pintura/pintura.css";
import {
// editor
locale_en_gb,
createDefaultImageReader,
createDefaultImageWriter,
createDefaultShapePreprocessor,
} from "@pqina/pintura";
import { redirect, useRouter } from "next/navigation";
setPlugins(plugin_crop, plugin_finetune, plugin_filter, plugin_annotate);
const editorDefaults = {
utils: [
"crop",
// "finetune",
// "filter",
// "annotate"
],
imageReader: createDefaultImageReader(),
imageWriter: createDefaultImageWriter(),
shapePreprocessor: createDefaultShapePreprocessor(),
...plugin_finetune_defaults,
...plugin_filter_defaults,
...markup_editor_defaults,
locale: {
...locale_en_gb,
...plugin_crop_locale_en_gb,
...plugin_finetune_locale_en_gb,
...plugin_filter_locale_en_gb,
...plugin_annotate_locale_en_gb,
...markup_editor_locale_en_gb,
},
};
export default function Page() {
const [originalAvatar, setOriginalAvatar] = useState<{
file: File;
width: number;
height: number;
} | null>(null);
}
The text was updated successfully, but these errors were encountered: