Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Support running on Windows #21

Open
gabritto opened this issue Mar 3, 2020 · 0 comments
Open

Support running on Windows #21

gabritto opened this issue Mar 3, 2020 · 0 comments

Comments

@gabritto
Copy link
Collaborator

gabritto commented Mar 3, 2020

We should support running dts-critic on Windows. So far dts-critic v3 was not tested on Windows, and the child_process command execution calls (like execFileSync and spawnSync) don't work. For example, running dts-critic on Windows for webpack gives the following error:

C:\Users\t-gaar\Desktop\DefinitelyTyped\dts-critic>node dist/index --dts=../DefinitelyTyped/types/webpack/index.d.ts --debug
C:\Users\t-gaar\Desktop\DefinitelyTyped\dts-critic\dist\index.js:153
    if (info.error !== undefined) {
             ^

TypeError: Cannot read property 'error' of null
    at getNpmInfo (C:\Users\t-gaar\Desktop\DefinitelyTyped\dts-critic\dist\index.js:153:14)
    at dtsCritic (C:\Users\t-gaar\Desktop\DefinitelyTyped\dts-critic\dist\index.js:63:21)
    at main (C:\Users\t-gaar\Desktop\DefinitelyTyped\dts-critic\dist\index.js:138:20)
    at Object.<anonymous> (C:\Users\t-gaar\Desktop\DefinitelyTyped\dts-critic\dist\index.js:832:5)
�[90m    at Module._compile (internal/modules/cjs/loader.js:959:30)�[39m
�[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)�[39m
�[90m    at Module.load (internal/modules/cjs/loader.js:815:32)�[39m
�[90m    at Function.Module._load (internal/modules/cjs/loader.js:727:14)�[39m
�[90m    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)�[39m
�[90m    at internal/main/run_main_module.js:17:11�[39m

This happens because this call to spawnSync fails.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant