Open ansarrafique opened 4 months ago
Thanks for this bug report,
Do you have markdown material in the .material folder? IF not, run yarn pullmat
to load the default material from the hpc-universe repo - if you wish to change this: this is configured in the yaml template in the config (https://blog.oxrse.uk/gutenberg/ has the details I think). If you have done this, and it still isn't working then let me know!
If this is the case, it is not ideal really that we get a crash here rather than a message on the /material page.
Yes, I do have the markdown material in the .material directory. I've managed to fix the problem by renaming the material to material-public in the public directory. This fixes the problem, but I am not sure if it's the right way?
@alasdairwilson Could you please confirm if this is the right approach and if it's safe to proceed?
I was able to recreate this by using windows, I kinda expected it to be a symbolic link issue because those do behave differently in windows and indeed it is.
Renaming would do nothing really because it is just a dead file in windows, I found that just deleting the symbolic link didn't seem to cause a problem with the build, the static pages are still built correctly however I can't remember the exact reason why the link is there.... so I would be reluctant to delete it incase it is part of some next wizardry for performance reasons.
You can however create an equivalent symbolic link using a powershell prompt and navigating to /public then:
New-Item -ItemType SymbolicLink -Path "material" -Target "../.material"
Which works identically, as far as my testing shows, to the existing one.
Also having seen the performance on native windows I would highly recommend using docker, there is a compose file for you to use to build the whole project or you can just build the dockerfile for just the node application, almost certainly will be more convenient for you!
Bug
I encountered a
Server Error
while generating the page after clicking the "View the teaching materials" button on the landing page (home page). The error message indicates a conflict between a public file and a page file for the path/material
.Error Message
Error: A conflicting public file and page file was found for path /material https://nextjs.org/docs/messages/conflicting-public-file-page
This error happened while generating the page. Any console logs will be displayed in the terminal window. Call Stack DevServer.handleRequestImpl
Steps to Reproduce
yarn dev
.Expected Behavior
The application should correctly serve the teaching materials page without conflicts and without generating a server error.
System Information
Additional Context
This error occurs specifically when navigating from the home page to the teaching materials page using the button provided. The conflict seems to be between a static file in the
public
directory and a dynamic route in thepages
directory both namedmaterial
.