antoine-coulon/skott

Tool crashes when run (ERR_INVALID_ARG_TYPE)

kaiyoma opened this issue · 1 comments

For starters, this tool hangs indefinitely when run in our repo. We discovered that for some reason, we have to delete a .docusaurus directory from one of our packages to get this tool to finish at all. After doing that, the tool crashes when run:

$ rush graph


Rush Multi-Project Build Tool 5.93.2 - https://rushjs.io/
Node.js version is 16.19.1 (LTS)


Trying to acquire lock for pnpm-7.29.3
Acquired lock for pnpm-7.29.3
Found pnpm version 7.29.3 in C:\Users\kgetz\.rush\node-v16.19.1\pnpm-7.29.3

Symlinking "C:\Users\kgetz\Work\event-viewer\common\temp\pnpm-local"
  --> "C:\Users\kgetz\.rush\node-v16.19.1\pnpm-7.29.3"
Acquiring lock for "common\autoinstallers\rush-plugins" folder...
Autoinstaller folder is already up to date

Starting "rush graph"

✓ Rush configuration found
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:429:7)
    at resolveAliasToRelativePath (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/src/modules/walkers/ecmascript/typescript/path-alias.js:37:36)
    at resolvePathAlias (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/src/modules/walkers/ecmascript/typescript/path-alias.js:51:16)
    at EcmaScriptDependencyResolver.resolve (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/src/modules/resolvers/ecmascript/resolver.js:81:40)
    at Skott.collectModuleDeclarations (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/src/skott.js:182:47)
    at async Skott.buildFromRootDirectory (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/src/skott.js:262:13)
    at async Skott.initialize (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/src/skott.js:270:13)
    at async skott (file:///C:/Users/kgetz/Work/event-viewer/common/autoinstallers/rush-plugins/node_modules/.pnpm/skott@0.17.3/node_modules/skott/dist/index.js:8:27) {
  code: 'ERR_INVALID_ARG_TYPE'
}

This is not directly related to skott but to krush, so I'm moving this issue there and closing it here.