webdriverio/webdriverio

[🐛 Bug]: 'wdio config' doesn't add @wdio/cli to devDependencies

Open

#13,774 创建于 2024年10月18日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)JavaScript (6,029 star) (1,793 fork)batch import
Bug 🐛help wanted

描述

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

v9.2.1

Node.js Version

v22.6.0

Mode

Standalone Mode

Which capabilities are you using?

-

What happened?

The npx @wdio/cli config command does not add @wdio/cli to package.json, which is an entrypoint for running e2e tests

What is your expected behavior?

@wdio/cli config must be added to package.json

How to reproduce the bug.

In an empty directory just do: npm init -y && npx @wdio/cli config -y and after that try npm run wdio. An attempt to run tests will obviously fail, because there is no wdio CLI available if it's not installed globally or if it's not added to package.json as a dependency.

PS: as for now it's required to take care about creating package.json (that's why I do npm init -y) because of #13771. But even if @wdio/cli config took care about creating package.json as expected, the @wdio/cli wouldn't be added anyway.

Relevant log output

/test2 # npm run wdio

> test2@1.0.0 wdio
> wdio run ./wdio.conf.js

sh: wdio: not found

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

贡献者指南