Tag Archives: yarn

Debian: Yarn fails to run.

Statue of Samuel Eliot Morison on The Mall on Commonwealth Ave in Boston.

Try setting the following environmental variable:

export NODE_PATH=/usr/lib/nodejs:/usr/share/nodejs

Yarn fails to run and shows a stacktrace like the following? Set the NODE_PATH.


Error: Cannot find module '@babel/runtime/helpers/interopRequireWildcard'
Require stack:
- /usr/share/nodejs/yarn/lib/cli/index.js
- /usr/share/nodejs/yarn/bin/yarn.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/share/nodejs/yarn/lib/cli/index.js:3:31)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/nodejs/yarn/lib/cli/index.js',
    '/usr/share/nodejs/yarn/bin/yarn.js'
  ]
}

The following posting on the Debian bug tracker will help:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933229