GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Dart LSP fails on Windows: 'Command not found' despite dart being in PATH · Issue #6861 · anomalyco/opencode Closed Labels DescriptionDescriptionThe Dart LSP integration fails on Windows with "Command not found: dart" even when:
Environment
Steps to Reproduce
Expected BehaviorDart LSP server starts and returns diagnostics. Actual BehaviorInvestigation FindingsVerification that dart works:# Bun.which finds dart correctly bun -e "console.log(Bun.which('dart'))" # Output: C:\Users\peopl\bin\dart.exe # dart runs fine dart --version # Output: Dart SDK version: 3.5.4 # Language server works dart language-server --help # Output: (help text displayed) # Spawn without shell works bun -e "const {spawn} = require('child_process'); const p = spawn(Bun.which('dart'), ['--version']); p.stdout.on('data', d => console.log(d.toString()))" # Output: Dart SDK version: 3.5.4 Config override doesn't help:Added to "lsp": { "dart": { "command": ["cmd.exe", "/c", "C:\Users\peopl\bin\dart.exe", "language-server", "--lsp"], "extensions": [".dart"] } } The LSP still reports "Command not found" - the config command override is being ignored during the availability check. Root Cause AnalysisThe issue appears to be in export const Dart: Info = { id: "dart", extensions: [".dart"], root: NearestRoot(["pubspec.yaml", "analysis_options.yaml"]), async spawn(root) { const dart = Bun.which("dart") if (!dart) { log.info("dart not found, please install dart first") return } return { process: spawn(dart, ["language-server", "--lsp"], { cwd: root, }), } }, } Two issues:
Proposed FixOption 1: Add process: spawn(dart, ["language-server", "--lsp"], { cwd: root, shell: process.platform === "win32", }), Option 2: Respect config command override during availability check - if user provides a custom command in config, skip the Related
Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |