antoine-coulon / skott

All-in-one devtool to automatically analyze, search and visualize project modules and dependencies from JavaScript, TypeScript (JSX/TSX) and Node.js (ES6, CommonJS)
MIT License
669 stars 25 forks source link

Invalid Skott config for 0.16.x versions #26

Closed yoyurec closed 1 year ago

yoyurec commented 1 year ago

Windows 10 Node.js v18.13.0 Skott v0.15.3 (running as: [ ] npx, [x] global, [ ] local)

PS D:\Projects\.........> skott .\src\app.ts

 Running Skott from entrypoint: .\src\app.ts
⠋ Initializing Skott
 Skott exited with code 1
file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/dist/src/config.js:30
        throw new Error(`Invalid Skott config. Reason: ${D.draw(decodeError)}`);
              ^

Error: Invalid Skott config. Reason: required property "dependencyResolvers"
└─ cannot decode undefined, should be Array<unknown>
    at file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/dist/src/config.js:30:15
    at C:\Users\YoYurec\AppData\Roaming\npm\node_modules\skott\node_modules\fp-ts\lib\Either.js:166:49
    at pipe (file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/node_modules/@fp-ts/data/_mjs/Function.mjs:192:14)
    at makeSkottConfig (file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/dist/src/config.js:29:12)
    at skott (file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/dist/index.js:7:43)
    at displaySkott (file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/dist/bin/main.js:96:33)
    at o.parse (C:\Users\YoYurec\AppData\Roaming\npm\node_modules\skott\node_modules\sade\lib\index.js:1:3402)
    at file:///C:/Users/YoYurec/AppData/Roaming/npm/node_modules/skott/dist/bin/cli.js:41:5
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

have no idea why (((

antoine-coulon commented 1 year ago

Hello @yoyurec,

This is a known issue that has been fixed in the latest versions (latest versions are v0.17.*). You can do "npm install -g skott@latest" and it should fix your issue :)

antoine-coulon commented 1 year ago

I just drafted a new release https://github.com/antoine-coulon/skott/releases/tag/v0.17.2 (I forgot to do it lately that's why it was still on the 0.15.3 on GitHub)

yoyurec commented 1 year ago

This is a known issue

didn't found it in git/issues ))

latest (v0.17.2) works like a charm! tnx

antoine-coulon commented 1 year ago

@yoyurec sorry yeah, I wanted to say that is was known on my side, you were absolutely right to report that here publicly so thanks for doing it! 🙏

I'll let this open if ever some people encounter the same problem.