Error: Cannot find module ‘babel-runtime/helpers/asyncToGenerator’

Bug description


I am using Debian’s provided yarn, and nvm for node.

yarnpkg --version

What is the current behavior?

No matter what command I send to yarn, I get the following error message:

  throw err;

Error: Cannot find module 'babel-runtime/helpers/asyncToGenerator'
Require stack:
- /usr/share/nodejs/yarn/lib/cli/index.js
- /usr/share/nodejs/yarn/bin/yarn.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at _load_asyncToGenerator (/usr/share/nodejs/yarn/lib/cli/index.js:17:54)
    at /usr/share/nodejs/yarn/lib/cli/index.js:21:41
    at Object.<anonymous> (/usr/share/nodejs/yarn/lib/cli/index.js:605:3)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32) {
  requireStack: [

What is the expected behavior?

I should get yarn’s version.

Steps to Reproduce

On a Debian “testing” system,

  1. install nvm from upstream
  2. install node from nvm: nvm use 12.16.2
  3. install yarnpkg Debian package (I tried with yarn version 1.22.4-2; the latest stable upstream version is also 1.22.4)
  4. run yarnpkg --version


  • Node Version: 12.16.2
  • Yarn v1 Version: 1.22.4
  • OS and version: Debian “testing” (amd64)

Author: Fantashit

1 thought on “Error: Cannot find module ‘babel-runtime/helpers/asyncToGenerator’

Comments are closed.