75lb / command-line-usage

A simple, data-driven module for creating a usage guide.
MIT License
208 stars 36 forks source link

v7.0.0: Cannot find module "*/dist/index.cjs" #42

Closed simonlovesyou closed 1 year ago

simonlovesyou commented 1 year ago

Seems like CommonJS imports broke with the v7.0.0 release; there's no ./dist/index.cjs included with the published package.

node:internal/modules/cjs/loader:535
      throw e;
      ^

Error: Cannot find module '/abbreviated/node_modules/command-line-usage/dist/index.cjs'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1022:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1015:15)
    at resolveExports (node:internal/modules/cjs/loader:529:14)
    at Function.Module._findPath (node:internal/modules/cjs/loader:569:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:981:27)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/<masked>/index.js:20:46)
    at Module._compile (node:internal/modules/cjs/loader:1165:14) {
  code: 'MODULE_NOT_FOUND',
  path: '/abbreviated/node_modules/command-line-usage/package.json'
}
75lb commented 1 year ago

thanks, looking into it..

75lb commented 1 year ago

Fixed and released in v7.0.1 - let me know if you find anything else, cheers!

simonlovesyou commented 1 year ago

Thanks! Seems to work great :)