Node module not found

I have an NPM manager step, a ZX install step, and a script, all as per the guide here:

All these steps succeed in logs

Have also added an install for Axios before the script step

I have a simple node .js script that runs fine locally, pasted into the script window of step

Script step fails 'Cannot find module ‘Axios’


| (4) Run ZX Script |
| id: script |
| version: 1.1.6 |
| collection: GitHub - bitrise-io/bitrise-steplib: New Bitrise StepLib |
| toolkit: bash |
| time: 2022-02-22T17:11:45Z |
| |
const err = new Error(message);
Error: Cannot find module ‘axios’
Require stack:

  • /var/folders/g2/xnd8hpjs50v433gfrybz2nxh0000gn/T//zx_script.mjs
    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:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at file:///private/var/folders/g2/xnd8hpjs50v433gfrybz2nxh0000gn/T/zx_script.mjs:3:15
    at (node:internal/modules/esm/module_job:197:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
    at async importPath (file:///Users/vagrant/.nvm/versions/node/v17.5.0/lib/node_modules/zx/zx.mjs:127:3)
    at async file:///Users/vagrant/.nvm/versions/node/v17.5.0/lib/node_modules/zx/zx.mjs:49:5 {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [ ‘/var/folders/g2/xnd8hpjs50v433gfrybz2nxh0000gn/T//zx_script.mjs’ ]

Have I missed something obvious? Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Hello @Ekalips :wave:

In case you still experience this issue, could you please submit a ticket to us with all the details you can provide at

Please make sure to send us the URL of a related build and enable Support User so we can take a closer look! :slightly_smiling_face: