thx / gogocode

GoGoCode is a transformer for JavaScript/Typescript/HTML based on AST but providing a more intuitive API.
MIT License
5.61k stars 425 forks source link

报错:ERR_INVALID_ARG_TYPE #163

Closed wormtql closed 2 years ago

wormtql commented 2 years ago

transform start

Error: npm WARN config global --global, --local are deprecated. Use --location=global instead. npm WARN config global --global, --local are deprecated. Use --location=global instead.

at Object.getCmdOutput (C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\util\cmd.js:26:19)
at Object.getGlobalPath (C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\util\check.js:27:36)
at C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\commands\transform.js:227:42
at new Promise (<anonymous>)
at requireTransforms (C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\commands\transform.js:212:12)
at C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\commands\transform.js:404:9
at Array.map (<anonymous>)
at handleCommand (C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\commands\transform.js:403:25)
at C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\commands\transform.js:435:13
at processTicksAndRejections (node:internal/process/task_queues:96:5)

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null at new NodeError (node:internal/errors:372:5) at validateString (node:internal/validators:120:11) at Object.join (node:path:429:7) at C:\Users\58413\AppData\Roaming\npm\node_modules\gogocode-cli\src\commands\transform.js:230:37 at processTicksAndRejections (node:internal/process/task_queues:96:5) { code: 'ERR_INVALID_ARG_TYPE' }

xianmings commented 2 years ago

https://github.com/npm/cli/issues/4980#issuecomment-1146163115