Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'C:\Disc' is not recognized as an internal or external command #60

Open
garbuzp opened this issue Sep 29, 2023 · 3 comments
Open

'C:\Disc' is not recognized as an internal or external command #60

garbuzp opened this issue Sep 29, 2023 · 3 comments

Comments

@garbuzp
Copy link

garbuzp commented Sep 29, 2023

I have this configuration in package.json according to the documentation:

  "lint-staged": {
    "src/**/*.{ts,js}": [
      "npx prettier --write"
    ],
    "src/**/*.ts": [
      "npx eslint --fix",
      "npx eslint",
      "npx tsc-files --noEmit"
    ]
  }

When I try to commit I get this error:

✖ tsc-files --noEmit:
'C:\Disc' is not recognized as an internal or external command,
operable program or batch file.
husky - pre-commit hook exited with code 1 (error)

Looks like it starts this command from the path, but I have no idea why.
Meanwile, if I run "npx tsc-files --noEmit" command directly in the vscode console, no errors, but nothing happens: it doesn't execute "npx tsc --project tsconfig.json".

Here is my tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": "./",
    "target": "esnext",
    "module": "CommonJS",
    "moduleResolution": "Node",
    "lib": ["dom", "dom.iterable", "esnext"],
    "outDir": "build",
    "rootDirs": ["src", "seeding-app", "cli"],
    "sourceMap": true,
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "noUnusedLocals": true,
  },
  "include": ["src/**/**/*.ts", "seeding-app/**/**/*.ts", "cli/**/*.ts"],
}

Any support would be appreciated.

@gustavopch
Copy link
Owner

I don't use Windows, so I can't do much to help. I suggest copying this file https://github.com/gustavopch/tsc-files/blob/master/cli.js to your project so you can easily debug.

@foohines
Copy link
Contributor

I have a fix for this issue in #62

@garbuzp
Copy link
Author

garbuzp commented Oct 15, 2023

@foohines thank you, that helps.
@gustavopch

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

No branches or pull requests

3 participants