Open irv-armenta-g opened 3 months ago
I'm not able to recreate. No documentation that calls out why stdout would return null for the pipe option. Which platform are you running on? Can you try running tsc-files
by itself? I'm curious if that command is failing and causing stdout to return null. Any sort of reproducible minimal environment would be extremely helpful
I am running this on windows.
I updated husky
and lint-staged
to latest version
"husky": "9.0.11",
"lint-staged": "15.2.7",
I still keep getting the same error:
yarn run v1.22.21
$ xxx\node_modules\.bin\lint-staged
✔ Preparing lint-staged...
⚠ Running tasks for staged files...
❯ .lintstagedrc — 8 files
❯ *.{ts,tsx} — 3 files
✖ lint-staged-tsc --noEmit --strict [FAILED]
◼ biome check --write --no-errors-on-unmatched
❯ *.cy.{ts,tsx} — 3 files
✖ yarn cy:run --spec [KILLED]
↓ *.{js,jsx} — no files
↓ Skipped because of errors from tasks.
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...
✖ lint-staged-tsc --noEmit --strict:
xxxl\node_modules\@spidy88\lint-staged-tsc\cli.js:26
const outputLines = stdout.toString().split(/[\r\n]+/);
^
TypeError: Cannot read properties of null (reading 'toString')
at Object.<anonymous> (xxx\node_modules\@spidy88\lint-staged-tsc\cli.js:26:28)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v20.10.0
I am not sure what you mean just by running tsc-files
by itself?
This is a NextJS 13
application.
Tried running lint-staged-tsc
on a file:
> yarn lint-staged-tsc -- src/components/SimpleAppear/SimpleAppear.cy.tsx
yarn run v1.22.21
\node_modules\.bin\lint-staged-tsc src/components/SimpleAppear/SimpleAppear.cy.tsx
xxx\node_modules\@spidy88\lint-staged-tsc\cli.js:26
const outputLines = stdout.toString().split(/[\r\n]+/);
^
TypeError: Cannot read properties of null (reading 'toString')
at Object.<anonymous> (C:\Users\Irving\Documents\code\gaudiy\tsukiji-user-panel\node_modules\@spidy88\lint-staged-tsc\cli.js:26:28)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v20.10.0
Getting the same const outputLines = stdout.toString().split(/[\r\n]+/);
error.
I will try to add kind of the environment I am working on right now: it's a
NextJS
project using typescript,NextJS
is version 12.3.Typescript:
"typescript": "5.4.5"
tsconfig.json
related packages versions: (not full package.json)
I am using
babel
at the moment to get code test coverage usingistanbul
; .babelrc file in root.And this is the error: