angular / angular

Deliver web apps with confidence 🚀
https://angular.dev
MIT License
94.97k stars 24.84k forks source link

docs: is not recognized as an internal or external command, operable program or batch file #55856

Open fendypurnomo opened 4 weeks ago

fendypurnomo commented 4 weeks ago

Describe the problem that you experienced

D:\Applications\docs\angular.io\angular>yarn docs
yarn run v1.22.19
$ [[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel run //adev:serve --fast_adev
'[[' is not recognized as an internal or external command,
operable program or batch file.
$ D:\Applications\docs\angular.io\angular\node_modules\.bin\bazel run //adev:serve --fast_adev
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //adev:serve (1319 packages loaded, 82779 targets configured).
INFO: Found 1 target...
ERROR: D:/applications/docs/angular.io/angular/adev/src/content/tutorials/homepage/BUILD.bazel:12:20: Action adev/src/content/tutorials/homepage/homepage failed: (Exit 1): playground.bat failed: error executing command bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\npm\@angular\docs\pipeline\playground.bat adev/src/content/tutorials/homepage external/npm/@angular/docs/pipeline/tutorials/common ... (remaining 2 arguments skipped)
'""' is not recognized as an internal or external command,
operable program or batch file.
ERROR: D:/applications/docs/angular.io/angular/adev/src/content/tutorials/playground/BUILD.bazel:10:20: Action adev/src/content/tutorials/playground/playground failed: (Exit 1): playground.bat failed: error executing command bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\npm\@angular\docs\pipeline\playground.bat adev/src/content/tutorials/playground external/npm/@angular/docs/pipeline/tutorials/common ... (remaining 2 arguments skipped)
'""' is not recognized as an internal or external command,
operable program or batch file.

Describe what you were looking for in the documentation

I'm cloning angular repo and i want to serve locally, but when i run command "yarn docs", i got an error

JeanMeche commented 4 weeks ago

Hi ! In which kind of command line are you running the script ?

JeanMeche commented 4 weeks ago

You need to run this script in a bash compatible command line.

JeanMeche commented 4 weeks ago

WSL will work for sure.

JeanMeche commented 3 weeks ago

Following up from what you mentioned in #55877, could you try to run that command with bash or zshshell instead of just sh ?

fendypurnomo commented 2 weeks ago

I use zsh on ubuntu to build this docs, but i got error like this:

ERROR: /root/angular/adev/src/content/guide/components/BUILD.bazel:3:16: Action adev/src/content/guide/components/advanced-configuration.md.html failed: (Exit 1): markdown.sh failed: error executing command bazel-out/k8-opt-exec-2B5CBBC6/bin/external/npm/@angular/docs/pipeline/markdown.sh bazel-out/k8-fastbuild/bin/adev/src/content/guide/components/advanced-configuration.md.html-0.params ... (remaining 1 argument skipped)

Use --sandbox_debug to see verbose messages from the sandbox

/root/.cache/bazel/_bazel_root/761bcdfcae98f7636f5b5cec8ab693a6/sandbox/processwrapper-sandbox/428/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48704
  const browser = await chromium.launch({
                                 ^
browserType.launch: Target page, context or browser has been closed

53159