Skip to content

codeceptjs init error #1930

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

Closed
kobenguyent opened this issue Oct 7, 2019 · 8 comments
Closed

codeceptjs init error #1930

kobenguyent opened this issue Oct 7, 2019 · 8 comments

Comments

@kobenguyent
Copy link
Collaborator

What are you trying to achieve?

Trying to using codeceptjs init to initiate the project.

What do you get instead?

Thanhs-MacBook-Pro:applitools-example thanhnguyen$ npx codeceptjs init

  Welcome to CodeceptJS initialization tool
  It will prepare and configure a test environment for you

Installing to /Users/thanhnguyen/Desktop/applitools-example
? Where are your tests located? ./*_test.js
? What helpers do you want to use? WebDriver
? Where should logs, screenshots, and reports to be stored? ./output
? Would you like to extend the "I" object with custom steps? Yes
? Where would you like to place custom steps? ./steps_file.js
? Do you want to choose localization for tests? English (no localization)
Configure helpers...
? [WebDriver] Base url of site to be tested https://applitools.com/helloworld
? [WebDriver] Browser in which testing will be performed chrome

Steps file created at /Users/thanhnguyen/Desktop/applitools-example/steps_file.js
Config created at /Users/thanhnguyen/Desktop/applitools-example/codecept.conf.js
Directory for temporary output files created at './output'
Intellisense enabled in /Users/thanhnguyen/Desktop/applitools-example/jsconfig.json
(node:18259) UnhandledPromiseRejectionWarning: Error: Could not load helper WebDriver from module './helper/WebDriver':
Required modules are not installed.

RUN: npm install --save-dev webdriverio@^5.2.2
    at createHelpers (/Users/thanhnguyen/Desktop/applitools-example/node_modules/codeceptjs/lib/container.js:153:13)
    at Function.create (/Users/thanhnguyen/Desktop/applitools-example/node_modules/codeceptjs/lib/container.js:33:25)
    at Codecept.init (/Users/thanhnguyen/Desktop/applitools-example/node_modules/codeceptjs/lib/codecept.js:55:15)
    at module.exports (/Users/thanhnguyen/Desktop/applitools-example/node_modules/codeceptjs/lib/command/definitions.js:307:12)
    at finish (/Users/thanhnguyen/Desktop/applitools-example/node_modules/codeceptjs/lib/command/init.js:192:7)
    at /Users/thanhnguyen/Desktop/applitools-example/node_modules/codeceptjs/lib/command/init.js:219:7
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
(node:18259) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18259) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npx codeceptjs init

Details

  • CodeceptJS version:
  • NodeJS Version: 12.4.0
  • Operating System: macOS Mojave 10.14.6
  • WebDriverIO
@butlera1
Copy link

butlera1 commented Oct 9, 2019

I have similar error:

BUTLEA1-M2:psur-reporter butlea1$ npx codeceptjs init

Welcome to CodeceptJS initialization tool
It will prepare and configure a test environment for you

Installing to /Users/butlea1/Code/psur-reporter
? Where are your tests located? ./tests
? What helpers do you want to use? WebDriver
? Where should logs, screenshots, and reports to be stored? ./output
? Would you like to extend the "I" object with custom steps? No
? Do you want to choose localization for tests? English (no localization)
(node:82093) UnhandledPromiseRejectionWarning: TypeError: console.print is not a function
at inquirer.prompt.then (/Users/butlea1/Code/psur-reporter/node_modules/codeceptjs/lib/command/init.js:127:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:82093) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of
an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:82093) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that
are not handled will terminate the Node.js process with a non-zero exit code.
BUTLEA1-M2:psur-reporter butlea1$

@pablopaul
Copy link
Collaborator

pablopaul commented Oct 21, 2019

Relates to #1976

@pablopaul
Copy link
Collaborator

pablopaul commented Oct 21, 2019

@DavertMik where is this old webdriverio version coming from: npm install --save-dev webdriverio@^5.2.2 ?

Ah, here: https://github.com/Codeception/CodeceptJS/blob/master/lib/helper/WebDriver.js#L453

@pablopaul
Copy link
Collaborator

pablopaul commented Oct 21, 2019

@peterngtr @butlera1 have you installed webdriverio before running npx codeceptjs init?

With npm install codeceptjs webdriverio --save-dev beforehand and then npx codeceptjs init with WebDriver helper everything works fine for me with CodeceptJS 2.3.3 and the hotfix (npm install [email protected] --save-dev) from #1976.

@kobenguyent
Copy link
Collaborator Author

@pablopaul I just create new project, step by step on the documentations, so I don't install webdriverio in prior.

@pablopaul
Copy link
Collaborator

@peterngtr which page where you following exactly? https://codecept.io/quickstart-webdriver does mention to install webdriverio :)

@kobenguyent
Copy link
Collaborator Author

actually I just follow the steps that come across my mind @pablopaul

@pablopaul
Copy link
Collaborator

So can you close the current issue @peterngtr ? :)

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

No branches or pull requests

3 participants