Skip to content
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

chore: fix build on Windows #1606

Merged
merged 2 commits into from
Aug 5, 2024
Merged

chore: fix build on Windows #1606

merged 2 commits into from
Aug 5, 2024

Conversation

matyasf
Copy link
Collaborator

@matyasf matyasf commented Jul 26, 2024

not fully fixed yet, cant commit due to conventional-changelog/commitlint#4106

what works:

  • bootstrap
  • dev
  • test:vitest almost (1 test fails for some reason)

@matyasf matyasf self-assigned this Jul 26, 2024
@@ -11,7 +11,7 @@
"homepage": "https://instructure.design",
"bugs": "https://github.com/instructure/instructure-ui/issues",
"scripts": {
"prestart": "npm run build:scripts:ts && node -e 'import(\"./lib/build-docs.mjs\").then(file => file.buildDocs());'\n",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows does not like such a fancy command at all :/ had to move it to a file

@@ -42,9 +43,9 @@ export default {
},
handler: async (argv) => {
const configFile = path.join(process.cwd(), argv.config)
const config = await import(configFile)
const configFileURL = pathToFileURL(configFile)
const config = await import(configFileURL)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import() for files must begin with file://, this is added by this built in helper

Copy link

github-actions bot commented Jul 26, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-08-05 14:19 UTC

@matyasf matyasf requested review from balzss and HerrTopi July 26, 2024 15:49
// scripts must be built from .ts files before this is run
import {buildDocs} from './lib/build-docs.mjs'

buildDocs()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this file created in windows? I think this file ending is not compatible with unix EOF. I think editing this file in macos should solve this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also the same file name with lib/build-docs.mjs is a bit confusion. I'm wondering if there's that file already, can't that one be run instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a way not to create a new file and not use fancy syntax in package.json but its also ugly: https://stackoverflow.com/a/75760840 What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it, now it doesn't need an extra file

@matyasf matyasf requested a review from balzss July 29, 2024 18:49
@matyasf matyasf merged commit 8c61905 into master Aug 5, 2024
9 checks passed
@matyasf matyasf deleted the fix_windows_build branch August 5, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants