Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run shell command #2711

Closed
vprasanth opened this issue Dec 8, 2020 · 0 comments · Fixed by #2743
Closed

Can't run shell command #2711

vprasanth opened this issue Dec 8, 2020 · 0 comments · Fixed by #2743

Comments

@vprasanth
Copy link

vprasanth commented Dec 8, 2020

What are you trying to achieve?

Trying to run yarn codeceptjs shell (same for npx codeceptjs shell).

What do you get instead?

codecept.runBootstrap is not a function (with npx).

More details when trying to execute installed codeceptjs:


> Provide console output if related. Use `--verbose` mode for more details.

```bash
XXXX@XZY demo-platform-tests % yarn codeceptjs shell 
yarn run v1.22.5
$ /Users/prasanthv/code/demo-platform-tests/node_modules/.bin/codeceptjs shell
/Users/prasanthv/code/demo-platform-tests/node_modules/codeceptjs/lib/command/interactive.js:17
  codecept.runBootstrap((err) => {
           ^

TypeError: codecept.runBootstrap is not a function
    at Command.module.exports (/Users/prasanthv/code/demo-platform-tests/node_modules/codeceptjs/lib/command/interactive.js:17:12)
    at Command.listener (/Users/prasanthv/code/demo-platform-tests/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/Users/prasanthv/code/demo-platform-tests/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/prasanthv/code/demo-platform-tests/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/Users/prasanthv/code/demo-platform-tests/node_modules/codeceptjs/bin/codecept.js:189:9)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Provide test source code if related

// paste test

Details

  • CodeceptJS version: 3.0.2
  • NodeJS Version: 14.15.0
  • Operating System: macOS Catalina 10.15.7
  • puppeteer || webdriverio || protractor || testcafe version (if related)
  • Configuration file:
const { setHeadlessWhen } = require("@codeceptjs/configure");
require("dotenv").config();

// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);

// @todo default to defacto test env
const base = process.env.TEST_ENV;

exports.config = {
  tests: "./tests/**/*.test.js",
  output: "./output",
  helpers: {
    ChaiWrapper: {
      require: "codeceptjs-chai",
    },
    Playwright: {
      url: base,
      show: true,
      browser: "chromium",
    },
  },
  include: {
    I: "./steps_file.js",
  },
  bootstrap: null,
  mocha: {},
  name: "demo-platform-tests",
  plugins: {
    pauseOnFail: {},
    retryFailedStep: {
      enabled: true,
    },
    tryTo: {
      enabled: true,
    },
    screenshotOnFail: {
      enabled: true,
    },
  },
};
stedman added a commit to stedman/CodeceptJS that referenced this issue Dec 30, 2020
@stedman stedman mentioned this issue Dec 30, 2020
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant