garronej / evt

💧EventEmitter's typesafe replacement
https://evt.land
MIT License
454 stars 6 forks source link

the latest release breaks denoify #61

Closed threepointone closed 1 year ago

threepointone commented 1 year ago

Hi! I think the latest release of evt might have broken denoify; running denoify gives this error:

Error: Cannot find module '/***/node_modules/denoify/node_modules/evt/dist/tools/reducers/partition.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1060:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1053:15)
    at resolveExports (node:internal/modules/cjs/loader:538:14)
    at Module._findPath (node:internal/modules/cjs/loader:607:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
    at Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/***/node_modules/denoify/lib/denoify.js:16:21)
    at Module._compile (node:internal/modules/cjs/loader:1218:14) {
  code: 'MODULE_NOT_FOUND',
  path: '/***/node_modules/denoify/node_modules/evt/package.json'
}

I think that's because in this commit https://github.com/garronej/evt/commit/2a2cd58abe7636cfd78db257d504e1e5c3bba4a5 you forgot to add dist/* to the files array in package.json. So trying to run this line of code https://github.com/garronej/denoify/blob/425336e1901948ca1ff07c509ef11d80c4032995/src/lib/denoify.ts#L13 resolves to evt/dist/tools/reducers/partition.js which doesn't exist in the published package.

My workaround is to use yarn's resolutions field and add "denoify/evt": "2.4.18" so it resolves to an older version.

garronej commented 1 year ago

Thank you for reporting!
Fixing right now!