[🐛 Bug]: 'wdio config' doesn't add @wdio/cli to devDependencies
#13,774 创建于 2024年10月18日
仓库指标
- Star
- (6,029 star)
- PR 合并指标
- (平均合并 15天 15小时) (30 天内合并 48 个 PR)
描述
Have you read the Contributing Guidelines on issues?
- I have 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