Description
Version
4.4.6
Environment info
System:
OS: Linux 5.7 Fedora 32 (Workstation Edition) 32 (Workstation Edition)
CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
Binaries:
Node: 14.7.0 - /usr/bin/node
Yarn: Not Found
npm: 6.14.7 - /usr/bin/npm
Browsers:
Chrome: dev
Firefox: 79.0
npmGlobalPackages:
@vue/cli: 4.4.6
Steps to reproduce
- On a Linux system, have Chrome Dev Channel on your PATH (as
google-chrome
) - Run
vue create test --inlinePreset '{"plugins": {"@vue/cli-plugin-e2e-nightwatch": {}}}'
What is expected?
The project creation should succeed, or otherwise fail with an explanatory error message
What is actually happening?
The CLI crashes with the following stacktrace:
TypeError: Cannot read property '1' of null
at module.exports (/home/scohen/Desktop/test/node_modules/@vue/cli-plugin-e2e-nightwatch/generator/index.js:30:51)
at Generator.initPlugins (/usr/lib/node_modules/@vue/cli/lib/Generator.js:150:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Generator.generate (/usr/lib/node_modules/@vue/cli/lib/Generator.js:168:5)
at async Creator.create (/usr/lib/node_modules/@vue/cli/lib/Creator.js:192:5)
at async create (/usr/lib/node_modules/@vue/cli/lib/create.js:72:3)
Stepping through the CLI code, this seems to be caused by the Linux app version detection code seeing the Chrome version as "dev", which then fails the regex match on the line reported in the stacktrace (as the regex is expecting a number).
I'm new to using the Vue CLI, so I'm not really equipped to say what desired behavior would be here (aside from a complete crash probably not being desirable). Looking into ChromeDriver, it appears the Dev Channel is only supported with canary builds, which the NPM package doesn't support installing, so I'd personally feel like a simple "Chrome Dev Channel is not supported" message would make sense.
If anyone else runs into this error and ends up reading this issue, I can confirm that installing the Stable version of Chrome and putting it on the PATH instead of Dev solves the issue.