siddharthkp/bundlesize

Problems with chalk

Open

#150 opened on Sep 25, 2017

View on GitHub
 (4 comments) (2 reactions) (0 assignees)JavaScript (218 forks)batch import
bughelp wanted

Repository metrics

Stars
 (4,434 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Do you want to request a feature or report a bug?

bug

What is the current behavior?

popper.js git/master*
❯ bundlesize
/Users/federicozivolo/Progetti/popper.js/node_modules/prettycli/node_modules/chalk/index.js:66
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
                                                                         ^

TypeError: Cannot read property 'close' of undefined
    at Object.<anonymous> (/Users/federicozivolo/Progetti/popper.js/node_modules/prettycli/node_modules/chalk/index.js:66:74)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/federicozivolo/Progetti/popper.js/node_modules/prettycli/index.js:1:77)
    at Module._compile (module.js:573:30)

If the current behavior is a bug, please provide the steps to reproduce.

Just run bundlesze after you installed the dependency of a monorepo using yarn workspaces.

I noticed that it's not something consistent, sometimes it's enough to uninstall a dependency (a random one) and the error goes away.

here's the log from my CI: https://travis-ci.org/FezVrasta/popper.js/builds/279562342

What is the expected behavior?

No errors

Please mention other relevant information.

  • node v8.4.0
  • npm5.3.0
  • Yarn 1.0.1
  • macOS 10.12.6
  • bundlesize version
  • CI you are using

Contributor guide