Windows support (i.e. directly via cmd.exe or powershell, not WSL)
See original GitHub issueHaving a tsconfig.json results in:
...\build.js: ReferenceError: prog is not defined
at ...\node_modules\estrella\dist\estrella.js:2:12202
at new Promise (<anonymous>)
at V (...\node_modules\estrella\dist\estrella.js:2:11825)
at n (...\node_modules\estrella\dist\estrella.js:2:6134)
at Aa (...\node_modules\estrella\dist\estrella.js:25:4614)
at ...\node_modules\estrella\dist\estrella.js:25:1271
at new Promise (<anonymous>)
at da (...\node_modules\estrella\dist\estrella.js:25:1228)
at build (...\node_modules\estrella\dist\estrella.js:26:801)
at Object.<anonymous> (...\build.js:3:1)
Which I assume might actually be a bug in esbuilds minification. The distributed estrella.js does not define prog (I’m thinking the name was minified but this reference was not).
Edit: it is actually never defined in the source
The actual error it was trying to print refers to “tsc” not being found in path. I actually see a windows check here but it’s not used further down in the function. As a note, I installed typescript through yarn locally which actually creates a ./node_modules/.bin/tsc.cmd file (not exe).
https://github.com/rsms/estrella/blob/6d54414c235a22b1b5a710b73cc63aca07d8708c/src/util.js#L18
Messing around to see the message also led me to find this (a +
was forgotten here since we get a runtime TypeError: "." is not a function
):
https://github.com/rsms/estrella/blob/6d54414c235a22b1b5a710b73cc63aca07d8708c/src/tslint.js#L89-L90
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
One more Windows issue:
X_OK
flag will not be available. Here’s what works for me: https://github.com/benmerckx/estrella/commit/6f62e60ebd3de880f55ba9c6103ed22e292ce034 Not sure if I can PR this since:prog
probably came from the estrella module before a refactor but importing would create circular imports so I just removed it. And I’m very unsure what should happen in a PATH lookup on Windows regarding extensions.A few notes on trying the latest version. Building a project results in:
Pulling in the latest git changes proved a little difficult. Apparently windows does not allow files named aux regardless the extension (https://stackoverflow.com/a/61616948).
Building estrella gave me the same error as above. Fiddling in the minified code a little gave me this insight:
https://github.com/rsms/estrella/blob/4ead3b90b6ad5747819cf813a29280ce3432d6e4/src/tslint.js#L88 tsprog here is the string: “C:\projects\estrella\node_modules.bin\tsc”
Seems that path came from here: https://github.com/rsms/estrella/blob/4ead3b90b6ad5747819cf813a29280ce3432d6e4/src/tsutil.ts#L34
When I add the (.cmd) extension there as well all works as expected.