• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

179
Views
`yarn bin` not working on Github actions?

yarn bin can usually be used to return to path to a binary installed locally.

It seems like it doesn't work once it run on a Github action. Is there anything else in this environment that throw offs Yarn path detection?

The command I'm running is yarn node --experimental-vm-modules $(yarn bin jest) (works locally, but fails on Github.) That's the command recommended by Jest to run tests on native esm modules.

I have an example failed run here you can see

$ yarn node --experimental-vm-modules $(yarn bin jest)
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '/home/runner/work/Inquirer.js/Inquirer.js//home/runner/work/Inquirer.js/Inquirer.js/node_modules/.bin/jest'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
error Command failed.

The weird thing is that the path seems to include the home directory 2 times /home/runner/work/Inquirer.js/Inquirer.js//home/runner/work/Inquirer.js/Inquirer.js/node_modules/.bin/jest - it's likely related to why it fails, but I can't figure out how it ends up like this 🤔

about 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error