question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Yarn Berry Support

See original GitHub issue

The Chromatic CLI seems to have issues running in a Yarn v2 project. Whenever we run yarn chromatic we get this error:

UnhandledPromiseRejectionWarning: TypeError: loggly.createClient is not a function

Wondering if this is a known issue with Yarn 2 or something else.

┆Issue is synchronized with this Asana task by Unito

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:27 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
mayteiocommented, Aug 18, 2021

I am also getting the following error;

TypeError: Ko._resolveFilename is not a function

We run this in CircleCI. In the meantime, we’ve got the following step in the job that switches to using the node-modules linker for pnp, which allows the job to run successfully:

  storybook_www:
    steps:
      - checkout
      - run:
          name: Change yarn pnp linker to node-modules
          command: sed -i '' 's/pnp/node-modules/' .yarnrc.yml
      - run: yarn install
      - run: npx chromatic ...
2reactions
ndelangencommented, Aug 12, 2021

I’m trying to reproduce this.

I made a new storybook repoduction with pnp enabled. https://github.com/ndelangen/storybook-pnp-repro

I immediately ran into a problem getting storybook to run. I applied a hot hack to my .pnp.cjs file and got it to run. https://discord.com/channels/486522875931656193/490070912448724992/875332132535410688

Next I installed chromatic, and my .pnp.cjs file got overwritten, breaking storybook again. I applied my fix again, and got storybook to run again.

Now I try and run the chromatic command, but this fails. Seems yarn pnp and the esm-package are fighting and neither wins.

TypeError: Ko._resolveFilename is not a function
    at wu (/Users/dev/.yarn/berry/cache/esm-npm-3.2.25-762b3ebd40-8.zip/node_modules/esm/esm.js:1:226797)
    at Eu (/Users/dev/.yarn/berry/cache/esm-npm-3.2.25-762b3ebd40-8.zip/node_modules/esm/esm.js:1:227999)
    at Module.<anonymous> (/Users/dev/.yarn/berry/cache/esm-npm-3.2.25-762b3ebd40-8.zip/node_modules/esm/esm.js:1:295976)
    at n (/Users/dev/.yarn/berry/cache/esm-npm-3.2.25-762b3ebd40-8.zip/node_modules/esm/esm.js:1:279589)
    at Object.<anonymous> (/Users/dev/.yarn/berry/cache/chromatic-npm-5.9.2-9561fc1d25-8.zip/node_modules/chromatic/bin/register.js:4:23)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.external_module_.Module._load (/Users/dev/Projects/Chroma/repro-pnp/.pnp.cjs:27681:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
Read more comments on GitHub >

github_iconTop Results From Across the Web

yarnpkg/berry: Active development trunk for Yarn - GitHub
Yarn supports Node by default but isn't limited to it - plugins can add support for other languages; Yarn supports workspaces natively, and...
Read more >
Plug'n'Play | Yarn - Package Manager
Native support; Support via plugins; Incompatible ... Many common frontend tools now support Plug'n'Play natively! ... Flow, Follow yarnpkg/berry#634.
Read more >
Support for Yarn 3 - Depfu Blog
We've been dancing around supporting Yarn 2 aka Yarn Berry for a while now because adoption seemed not to be there.
Read more >
Yarn Berry: a next generation package manager - YouTube
The recently released Yarn Berry (aka Yarn 2) brings a host of great new features for JavaScript developers. The slick new CLI, ...
Read more >
Using the new yarn release (2.0.0 / berry) - Support
tl;dr: remove the YARN_VERSION env config from netlify.toml , check in the contents of .yarn/releases after installing yarn@berry and running yarn in your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found