wgrabowski / ngx-unused

Find declared but unused Angular classes in your codebase.
https://www.npmjs.com/package/ngx-unused
21 stars 2 forks source link

Missing glob #15

Closed ricmello closed 10 months ago

ricmello commented 10 months ago

Hey @wgrabowski thanks for sharing this library. I just found your repo and I was able to find and remove a lot of unused classes in an old project thanks to it. Great job!

I'm facing this error that I was able to manage by myself installing glob globally:

> ngx-unused libs apps/owner-panel -p tsconfig.base.json    
node:internal/modules/esm/resolve:844
  throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
        ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'glob' imported from /Users/ricardo/.nvm/versions/node/v20.10.0/lib/node_modules/ngx-unused/dist/createProject.js
    at packageResolve (node:internal/modules/esm/resolve:844:9)
    at moduleResolve (node:internal/modules/esm/resolve:901:20)
    at defaultResolve (node:internal/modules/esm/resolve:1121:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.10.0
wgrabowski commented 10 months ago

Hello @ricmello , thanks for reporting it! Looks like I've put glob in devDependencies, I will release fix soon, hopefully today.

wgrabowski commented 10 months ago

Fixed and released in v1.1.1