redhat-developer / redhat-developer/vscode-java

npm run watch-server fails on Windows

Open
#1,967 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debt
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

[provide a description of the issue]

Environment
  • Operating System: Windows
  • JDK version: 11
  • Visual Studio Code version: 1.56.2
  • Java extension version: v0.79.2
Steps To Reproduce
  1. git clone https://github.com/redhat-developer/vscode-java.git
  2. cd vscode-java
  3. npm run watch-server

I get result:

> java@0.80.0 watch-server
> ./node_modules/.bin/gulp watch_server 
'.' is not recognized as an internal or external command,
operable program or batch file. 

Running a full path command like
cmd /c c:/dev/temp/vscode-java/node_modules/.bin/gulp dev_server
gives:

C:\Dev\temp\vscode-java>cmd /c c:/dev/temp/vscode-java/node_modules/.bin/gulp dev_server 
[18:28:27] Using gulpfile C:\Dev\temp\vscode-java\gulpfile.js
[18:28:28] Starting 'dev_server'...
executing mvnw.cmd -Pserver-distro,fast -o clean package -Denvironment.os=win32 -Denvironment.ws=win32 -Denvironment.arch=x86_64
[18:28:28] 'dev_server' errored after 7.28 ms
[18:28:28] Error: spawnSync C:\WINDOWS\system32\cmd.exe ENOENT
at Object.spawnSync (internal/child_process.js:1070:20)
at spawnSync (child_process.js:597:24)
at Object.execSync (child_process.js:642:15)
at C:\Dev\temp\vscode-java\gulpfile.js:41:5
at dev_server (C:\Dev\temp\vscode-java\node_modules\undertaker\lib\set-task.js:13:15)
at bound (domain.js:429:14)
at runBound (domain.js:442:12)
at asyncRunner (C:\Dev\temp\vscode-java\node_modules\async-done\index.js:55:18)
at processTicksAndRejections (internal/process/task_queues.js:79:11) 

I know I can do it all manually, just to let you know

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running npm run watch-server on Windows and inspect the watch_server task in gulpfile.js, where the command invocation fails. Trace the Windows command handling shown in the error output and verify that the watch-server workflow completes successfully without the reported executable or cmd.exe errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.