Library
React Components / v9 (@fluentui/react-components)
System Info
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 15.12 GB / 31.59 GB
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (105.0.1343.33), ChromiumDev (107.0.1379.1)
Internet Explorer: 11.0.22000.120
Are you reporting Accessibility issue?
no
Reproduction
On Windows (not WSL) run yarn workspace @fluentui/ssr-tests-v9 build
Bug Description
Actual Behavior
Running yarn workspace @fluentui/ssr-tests-v9 build fails on Windows (I'm using Powershell but anything that's not WSL will fail).
Example error:
✘ [ERROR] Could not resolve "......packages\react-components\react-dialogsrcstoriesDialogDialogCustomTrigger.stories"
dist/stories.tsx:138:53:
138 │ ...CustomTrigger as DialogCustomTrigger } from "......packages\react-components\react-dialogsrcstoriesDialogDialogCustomTrigger.stories";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path
"......packages\react-components\react-dialogsrcstoriesDialogDialogCustomTrigger.stories" as
external to exclude it from the bundle, which will remove this error.
Examining the dist/stories.tsx file that is built shows imports like this:
import { Default as AccordionDefault } from "......packages\react-components\react-accordionsrcstoriesAccordionAccordionDefault.stories";
This looks to be from this line in getImportsFromIndexFile.ts that uses a file system path for the import path:
path: path.relative(distDir, path.resolve(path.dirname(filename), sourcePath.node.value)),
Using Node's path.posix might be the way to go here but in my (admittedly simple) test posix includes the Windows drive letter in the path (e.g., "C:/the/path").
Expected Behavior
ssr-tests-v9 can be built and run on Windows.
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
Library
React Components / v9 (@fluentui/react-components)
System Info
System: OS: Windows 10 10.0.22000 CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz Memory: 15.12 GB / 31.59 GB Browsers: Edge: Spartan (44.22000.120.0), Chromium (105.0.1343.33), ChromiumDev (107.0.1379.1) Internet Explorer: 11.0.22000.120Are you reporting Accessibility issue?
no
Reproduction
On Windows (not WSL) run
yarn workspace @fluentui/ssr-tests-v9 buildBug Description
Actual Behavior
Running
yarn workspace @fluentui/ssr-tests-v9 buildfails on Windows (I'm using Powershell but anything that's not WSL will fail).Example error:
Examining the
dist/stories.tsxfile that is built shows imports like this:This looks to be from this line in
getImportsFromIndexFile.tsthat uses a file system path for the import path:Using Node's path.posix might be the way to go here but in my (admittedly simple) test
posixincludes the Windows drive letter in the path (e.g., "C:/the/path").Expected Behavior
ssr-tests-v9can be built and run on Windows.Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations