You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GraphQL helper: false "axios not installed" error due to require() in ESM context (CodeceptJS 4.0.8) #5654
Run npx codeceptjs check with the GraphQL helper configured.
What do you get instead?
CodeceptJS throws an error claiming axios is not installed, even though it is present in node_modules.
Error: Required modules are not installed.
RUN: [sudo] npm install -g axios
at checkHelperRequirements (.../node_modules/codeceptjs/lib/container.js:434:13)
at .../node_modules/codeceptjs/lib/container.js:370:15
Root cause:GraphQL.js uses require('axios') inside _checkRequirements(), but since CodeceptJS 4 is ESM, require is not defined. This causes the catch block to always trigger and incorrectly report axios as missing.
// node_modules/codeceptjs/lib/helper/GraphQL.jsstatic_checkRequirements(){try{require('axios')// ❌ require is not defined in ESM context}catch(e){return['axios']// always returns this, even when axios IS installed}}
Suggested fix:
static_checkRequirements(){// axios is already imported at the top of this ESM file,// so no runtime check is needed herereturnnull}
Activity
fix(graphql): drop ESM-broken _checkRequirements() so `check` works (#…
fix(graphql): drop ESM-broken _checkRequirements() so `check` works (#…