Files
Nim/compiler/nodejs.nim
ghost 8e9fc5e639 a better message if graphviz's dot/nodejs is not found in PATH (#21488)
* finish issue #21474: a better message if dot is not found locally when using gendepend

* fix a typo in compiler

* trim empty path reported in `findNodeJs`

* compiler/main.nim: switch raise to simply quit
2023-03-08 22:34:59 +01:00

11 lines
343 B
Nim

import os
proc findNodeJs*(): string {.inline.} =
## Find NodeJS executable and return it as a string.
result = findExe("nodejs")
if result.len == 0:
result = findExe("node")
if result.len == 0:
echo "Please install NodeJS first, see https://nodejs.org/en/download"
raise newException(IOError, "NodeJS not found in PATH")