-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Build fails on Windows PowerShell with modern Node #1394
Comments
It looks like you are using PowerShell. I don’t think we support that well. Can you try with WSL? |
Yes now its working thanks very much for quick help |
* Resolves the "initial" CSS modules differently so that Windows users don't get a posix path * Uses`initialCssModule` from initial-css-plugin to identify these modules
@surma Why do we not support Powershell again? Are there some commands or smth we're using that are linux specific? |
I think I was wrong, actually. @RReverser spent some time years ago adding support for PowerShell. In fact, we even run CI on Windows. However, after I opened #1423, I learned that we only ever ran CI with Node 14 and that CI breaks on Windows with Node 22. The error looks very similar to what OP said, so we should prob investigate. |
There seems to be a typo in the On my system the path to the squoosh dir is // (css-plugin)
"Resolving css:shared/prerendered-app/colors.css from initialCss"
// (resolve-dirs-plugin)
"Trying to resolve shared/prerendered-app/colors.css"
"Trying to resolve ./src/shared/prerendered-app/colors.css"
"Successfully resolved using this.resolve"
resolveResult = {
external: true,
id: './src/shared/prerendered-app/colors.css',
meta: {},
moduleSideEffects: true,
syntheticNamedExports: false
}
// Not absolute, so return posix.resolve(resolveResult)
posix.resolve(resolveResult) // "/Projects/Squoosh/src/shared/prerendered-app/colors.css"
// (back to css-plugin)
return prefix + resolved.id; // "css:/Projects/Squoosh/src/shared/prerendered-app/colors.css" And of course, the POSIX path does not exist on Windows, so we end up with this error:
Using the fix shown in #1425, the logs will be the same except the ending: // ...
// Not absolute, so return the path module's resolve(resolveResult) [the one that adjusts for the platform automatically]
resolve(resolveResult) // "C:\Projects\Squoosh\src\shared\prerendered-app\colors.css"
// (back to css-plugin)
return prefix + resolved.id; // "css:C:\Projects\Squoosh\src\shared\prerendered-app\colors.css" Which correctly points to the CSS file. Tried it on both Windows and WSL, so fingers crossed. |
The text was updated successfully, but these errors were encountered: