What happened?
The Fabric UI “Getting Started” page suggests a Rayfin scaffold command that fails when copied and run from PowerShell:
npm create @microsoft/rayfin@latest -- "App_Name_Here" --workspace "Workspace Name Here"
The issue is that --workspace is interpreted by npm itself as npm’s workspace option, rather than being forwarded to the @microsoft/rayfin create CLI.
Adding an extra -- before --workspace fixes the command:
npm create @microsoft/rayfin@latest -- "App_Name_Here" -- --workspace "Workspace Name Here"
Where the command comes from
The command is shown in the Microsoft Fabric UI under the Rayfin app “Getting Started” instructions.
The UI currently suggests:
npm create @microsoft/rayfin@latest -- "App_Name_Here" --workspace "Workspace Name Here"
Expected behavior
The command copied from Fabric UI should scaffold the Rayfin app successfully.
Actual behavior
The command fails before the Rayfin CLI appears to receive the --workspace argument.
npm treats --workspace as an npm workspace flag and tries to locate a root package.json in the current directory.
Error excerpt:
warn init Missing package.json. Try with `--include-workspace-root`.
error code ENOENT
error syscall open
error path C:\Users\REDACTED\projetos\rayfin\package.json
error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Users\REDACTED\projetos\rayfin\package.json'
Workaround
Use an additional argument separator before the Rayfin-specific --workspace flag:
npm create @microsoft/rayfin@latest -- "App_Name_Here" -- --workspace "Workspace Name Here"
This works successfully in my environment.
Suggested fix
The Fabric UI should generate the command with an extra -- before the Rayfin CLI options:
This prevents npm from consuming --workspace as its own workspace option and forwards it to the Rayfin CLI.
Steps to reproduce
- Open PowerShell on Windows.
- Navigate to a folder that is not an npm workspace root and does not contain a
package.json.
- Run the command suggested by Fabric UI:
npm create @microsoft/rayfin@latest -- "App_Name_Here" --workspace "Workspace Name Here"
- Observe npm failing with
Missing package.json / ENOENT.
Environment
- OS: Windows
- Shell: PowerShell
- Node.js: v22.14.0
- npm: 10.9.2
- Current directory did not contain a root
package.json
Logs or screenshots
What happened?
The Fabric UI “Getting Started” page suggests a Rayfin scaffold command that fails when copied and run from PowerShell:
The issue is that
--workspaceis interpreted bynpmitself as npm’s workspace option, rather than being forwarded to the@microsoft/rayfincreate CLI.Adding an extra
--before--workspacefixes the command:Where the command comes from
The command is shown in the Microsoft Fabric UI under the Rayfin app “Getting Started” instructions.
The UI currently suggests:
Expected behavior
The command copied from Fabric UI should scaffold the Rayfin app successfully.
Actual behavior
The command fails before the Rayfin CLI appears to receive the
--workspaceargument.npm treats
--workspaceas an npm workspace flag and tries to locate a rootpackage.jsonin the current directory.Error excerpt:
Workaround
Use an additional argument separator before the Rayfin-specific
--workspaceflag:This works successfully in my environment.
Suggested fix
The Fabric UI should generate the command with an extra
--before the Rayfin CLI options:This prevents npm from consuming
--workspaceas its own workspace option and forwards it to the Rayfin CLI.Steps to reproduce
package.json.npm create @microsoft/rayfin@latest -- "App_Name_Here" --workspace "Workspace Name Here"Missing package.json/ENOENT.Environment
package.jsonLogs or screenshots