medikoo/cli-color

semver versioning dependency breaks on es5-ext 0.10.52

cawalch opened this issue · 2 comments

Throws the following exception when a newer version of es5-ext is installed

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'es5-ext/object/assign'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/me/some-project/backend/node_modules/d/index.js:5:23)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/me/some-project/backend/node_modules/cli-color/index.js:3:9)

I was able to get it working with...

// package.json
"resolutions": {
  "cli-color/**/es5-ext": "0.10.51"
}

@cawalch It looks as problem with your installation.

cli-color has es5-ext dependency properly configured and es5-ext@0.10.51 has es5-ext/object/assign module.

I'm closing it now, but if you have further doubts do not hesitate to comment

Confirmed it was local.

There was a cached version of es5-ext missing object/assign. Clearing my yarn cache fixed it.

Thanks!