dryRun Command: Troubleshooting and Validation
Validate your slnodejs setup locally, review dryRun output, and fix common configuration issues before CI.
Use dryRun to validate your slnodejs setup locally before you spend time on CI runs.
It helps you confirm that SeaLights scans the right files, resolves the right sources, and catches configuration issues early.
When to use dryRun
Use dryRun during first-time setup, when the scan includes unexpected files, when source maps do not resolve as expected, or when NYC coverage paths do not line up with the build scan.
It is the fastest way to see what the agent will analyze before you move the flow into CI.
Before you start
Make sure the slnodejs agent is installed. See Downloading the Node.js Agent.
Run the command
Since dryRun runs locally, it does not require a token or a build session ID, except with --instrumentForBrowsers, which needs a valid token (--tokenFile).
Start with the smallest command that matches your build.
At minimum, pass --scanDir for the build output directory. Add --scm git to also check Git paths.
In most cases, add --verbose so the console output is easier to read. Use --instrumentForBrowsers (with --tokenFile) for front-end browser builds. Add --hasNycReport and --report only when unit test coverage is part of the integration.
If unit tests are in scope, validate the NYC JSON coverage file in the same run:
After the command completes, use the summary table to find the first issue to fix.
Example output:
All details, including warnings, errors, and logs, are written to sl-dry-run-output.
Recommended workflow
Review generated files and fix the main issues
Open the files under sl-dry-run-output to confirm what the agent actually scanned.
Start with included-files.json and excluded-files.json. These two files tell you whether the right files are in scope and whether the current exclusions are working as expected.
Next, review sl-mapping.json to see how source maps resolve back to source files. Use agent-events.json when you need the full warning or error details behind the summary table.
By this point, you can usually tell whether the next fix is about scan scope, source maps, or path alignment.
Map each summary item to the next fix
Once you know which row failed, use the table below to choose the most likely next fix.
This mapping helps you move from the command output to the right remediation step without guessing.
Column information
Your source maps do not include column information.
Regenerate source maps with both line and column mapping enabled.
Git Paths
The scanned project structure does not match the Git project structure.
Check --buildScanProjectRoot and make sure it aligns with your repository root.
Raw Third Parties
The scan includes bundled framework or vendor files.
Refine your scan scope and add exclusions in .slignore.
Logical Third Parties
Your source maps resolve to generated or third-party source files.
Fix source map generation and exclude irrelevant mapped files in .slignore.generated.
Nyc Paths
The NYC report paths or signatures do not match the SeaLights build scan.
Validate --buildScanProjectRoot and --nycProjectRoot.
Position Match
Method and branch positions in the NYC report differ too much from the SeaLights scan.
Make sure both analyses use the same code baseline and build configuration.
Common errors
Use these quick answers when you hit a common issue. Expand an item when you need the next step.
Command options reference
Last updated
Was this helpful?

