-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
npm run build fails on Windows #336
Comments
This is mostly for my reference, as I seem to be the first to try it on local storage. I have fixes for this in my massive insane PR as well, but I have streamlined the code at the same time. |
I was seeing this, but wasn't sure that it was a bug. Guess I know now! |
Aye. I think that issues like this can generally be avoided if the 'path' functions are used for anything when working with filePaths. It results in slightly less readable code, but is guaranteed to be cross platform. |
I am eagerly awaiting this PR to be merged. As soon as this goes through were going to convert most of our internal wikis to Docusaurus. Our build servers are windows based, and this is our last major hurdle. Thanks for working on this its much appreciated! |
Hi all - I am back after some holiday and end of year work that I needed to get taken care of. Since I see this is a popular issue that needs fixing, I will focus on this now. @neilsutcliffe Hi! It looks like #360 is your PR that would fix this issue, correct? |
#360 Will fix it. It's as the build process uses the incorrect path seperation character. The refactor uses the NPM path tools all over to ensure that it works cross platform. #360 is a big change, but will only affect the built files. Should be relatively easy to test, although I haven't tested with translated docs or versions myself. Would it be worth creating a release branch? |
Those previous comments that I deleted were made for another repo -- too many tabs open. Sorry. |
@neilsutcliffe Would it be worth creating a smaller commit/PR to fix this particular issue now since #360 may require a bunch of testing? |
I'm gonna say it's not worth it, as the PR is too different from the existing codebase to copy and paste lines. It's a complete refactor. Any fixes would have to be made from scratch as the code just is not comparable. |
I'm going to try and write some extra tests in #360 for versioning, amongst other things. The hardest bit of tests are determining behavour. I wonder if it is possible to write a test for windows path issues on a linux box? Honestly, I'm just glad they both treat extensions the same way. |
See #381 for a hopefully targeted fix to the Windows build problem. |
Fixed by #381. |
Is this a bug report?
Yes
The 'npm run build' process does not work on Windows. Specifically we use string concatenation and regex with UNIX specific patterns in generate.js
Have you read the Contributing Guidelines?
Yes
Environment
WINDOWS
Steps to Reproduce
With a working install on Windows
Expected Behavior
A nice build file with documents, blogs, pages and static files
Actual Behavior
all 4 fail in different ways.
The text was updated successfully, but these errors were encountered: