appium: Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new' when starting appium CLI
The problem
Cannot run appium cli after upgrading to 1.9.1. Last version which worked fine is 1.8.1. When running from the command line, I get the error Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new'
(see below for the full output).
Environment
- Appium version (or git revision) that exhibits the issue: 1.9.1
- Last Appium version that did not exhibit the issue (if applicable): 1.8.1
- Desktop OS/version used to run Appium: macOS High Sierra
- Node.js version (unless using Appium.app|exe): 9.11.1
- Mobile platform/version under test: N/A
- Real device or emulator/simulator: N/A
- Appium CLI or Appium.app|exe: CLI
Details
If necessary, describe the problem you have been experiencing in more detail.
Link to Appium logs
seavan@mbpro2016 peerio-mobile $ ./node_modules/.bin/appium
[Appium] Welcome to Appium v1.9.1
Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new'
at new AppiumDriver (/Users/seavan/Documents/peerio/peerio-mobile/node_modules/appium/lib/appium.js:131:19)
at main$ (/Users/seavan/Documents/peerio/peerio-mobile/node_modules/appium/lib/main.js:124:16)
at tryCatch (/Users/seavan/Documents/peerio/peerio-mobile/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/seavan/Documents/peerio/peerio-mobile/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/seavan/Documents/peerio/peerio-mobile/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/seavan/Documents/peerio/peerio-mobile/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at <anonymous>
Code To Reproduce Issue [ Good To Have ]
Run the appium on fresh install (CLI).
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 19 (7 by maintainers)
Indeed, this has caught us in the middle of the process of upgrading our build internals. Appium
1.9.2-beta.2
is now published. Please install withnpm uninstall -g appium && npm install -g appium@beta
.@imurchie @mykola-mokhnach
confirming that 1.9.2-beta.2 works fine:
Yesterday, I faced the error. But today, I haven’t met it yet after removing
build
andnode_modules
(build github appium repository directly), or uninstalling appium (build vianpm -g
). I assume something was broken inbuild
ornode_modules
on my env…I confirmed with node v8.9.4/ npm 5.6.0, node v9.11.1/npm 5.6.0 and node v10.11.0/npm 6.4.1.