-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Can't build NextJS app from source #420
Comments
Can you try again using Docker? |
You mean just to check ? |
@AykutSarac Not sure whether it is rather you updating the build process or me trying to build it in a different way, but I now manage to build it, although there are warnings and path issues. Here are my new build steps on a fresh ubuntu-latest Github Actions' VM:
A few notes:
So with these steps, the build is successful, but there are following warnings: Warnings in build log
I'm not too worried about Sentry-related warnings, but what about the Eventually, resources' paths are all absolute paths - e.g. |
I was eventually able to manage to customize base root by adding Additionally I had to change the following files to avoid broken/unconsistent links: sed -i 's/\/editor/\/my_custom_path\/editor"/g' "./public/manifest.json"
sed -i 's/assets/\/my_custom_path\/assets"/g' "./public/manifest.json"
sed -i 's/jsoncrack.com/my_custom_domain\/my_custom_path/g' "./src/constants/seo.ts"
sed -i 's/"\/manifest.json"/"\/my_custom_path\/manifest.json"/g' "./src/constants/seo.ts"
sed -i 's/"\/favicon.ico"/"\/my_custom_path\/favicon.ico"/g' "./src/constants/seo.ts"
sed -i 's/"\/assets/"\/my_custom_path\/assets/g' "./src/containers/Editor/components/LiveEditor.tsx"
sed -i 's/"\/assets/"\/my_custom_path\/assets/g' "./src/containers/Editor/components/views/GraphView/index.tsx"
sed -i 's/"\/assets/"\/my_custom_path\/assets/g' "./src/layout/JsonCrackLogo.tsx" Other questions in previous post are still unanswered - I can't use |
Issue description
Hello,
I have tried to build the following way:
but it fails with the following error:
I assume the error comes from the
require("reaflow")
line in/src/containers/Editor/components/views/GraphView/lib/utils/getNodePath.ts
I have tried several things without success, including what is suggested in NextJS docs, that is to say replacing the first lines of
getNodePath.ts
with something like:But then the build fails with following error:
Type error: Argument of type '() => Promise<(nodes: NodeData<any>[], edges: EdgeData<any>[], startId: string) => any[]>' is not assignable to parameter of type 'DynamicOptions<NodeData<any>[]> | Loader<NodeData<any>[]>'. Type '() => Promise<(nodes: NodeData<any>[], edges: EdgeData<any>[], startId: string) => any[]>' is not assignable to type '() => LoaderComponent<NodeData<any>[]>'. Type 'Promise<(nodes: NodeData<any>[], edges: EdgeData<any>[], startId: string) => any[]>' is not assignable to type 'LoaderComponent<NodeData<any>[]>'. Type '(nodes: NodeData<any>[], edges: EdgeData<any>[], startId: string) => any[]' is not assignable to type 'ComponentType<NodeData<any>[]> | ComponentModule<NodeData<any>[]>'. Type '(nodes: NodeData<any>[], edges: EdgeData<any>[], startId: string) => any[]' is not assignable to type 'FunctionComponent<NodeData<any>[]>'. Target signature provides too few arguments. Expected 3 or more, but got 2. > 6 | const getParentsForNodeId = dynamic(() => import("reaflow"), { 7 | ssr: false, 8 | }); 9 |
Or if I use instead as found somewhere on the Internet:
a similar error:
Would you have any clue ?
Media & Screenshots
No response
Operating system
Priority this issue should have
Low (slightly annoying)
The text was updated successfully, but these errors were encountered: