You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running npx sucrase -p ., an error message occurs:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
at Object.stat (node:fs:1615:10)
at /project/path/node_modules/mz/fs.js:58:8
at new Promise (<anonymous>)
at exports.exists (/project/path/node_modules/mz/fs.js:57:10)
at runGlob (/project/path/node_modules/sucrase/dist/cli.js:186:26)
at async buildDirectory (/project/path/node_modules/sucrase/dist/cli.js:299:13) {
code: 'ERR_INVALID_ARG_TYPE'
Given a minimal
tsconfig.json
:When running
npx sucrase -p .
, an error message occurs:The problem occurs here
sucrase/src/cli.ts
Lines 186 to 188 in 61c05e1
because
outDirPath
does not have a default value.This error message is confusing and it took me digging in the sucrase code to find the answer.
I don't know what the right answer is for how it should behave, but some ideas are :
outDirPath
can behave similarly totsc
, which compiles files next to the originals ifcompilerOptions.outDir
is not definedoutDir
is not defined intsconfig.json
The text was updated successfully, but these errors were encountered: