appium: Not able to launch appium after upgrade node 10.0.0

The problem

Appium is not being launched after node upgrade to 10.0.0

Environment

  • Appium version (or git revision) that exhibits the issue: 1.8.0
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: High sierra 10.13.4 (17E199)
  • Node.js version (unless using Appium.app|exe): 10.0.0
  • Mobile platform/version under test: Not required
  • Real device or emulator/simulator: Not required
  • Appium CLI or Appium.app|exe: Not Required

Details

Appium 1.8.0 was working fine with older version of node, but after upgrade node to recent one (10.0.0), unable to launch appium.

Link to Appium logs

Please fine below appium logs.

internal/util.js:360
    const filename = frame.getFileName();
                           ^

TypeError: frame.getFileName is not a function
    at isInsideNodeModules (internal/util.js:360:28)
    at showFlaggedDeprecation (buffer.js:149:8)
    at new Buffer (buffer.js:174:3)
    at retrieveSourceMap (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:118:21)
    at mapSourcePosition (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:140:21)
    at wrapCallSite (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:303:20)
    at /usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:338:26
    at Array.map (<anonymous>)
    at Function.prepareStackTrace (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:337:24)
    at process.emit (/usr/local/lib/node_modules/appium/node_modules/asyncbox/node_modules/source-map-support/source-map-support.js:387:52)
    at process._fatalException (internal/bootstrap/node.js:435:27)

Code To Reproduce Issue [ Good To Have ]

  • Upgrade node to latest one (10.0.0)

  • Launch appium

It working fine after downgrading node version.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 20 (3 by maintainers)

Most upvoted comments

Yes. As it stands, this WILL NOT WORK. The latest Appium was released before Node 10 was released. We are working on getting it working.

@PaulysGitHub , Do this in order to restore old node version. Even I faced the same issue, downgrade node version by

  • Uninstall node brew uninstall node

  • Install node lower version of node brew install node@8

  • Do force link to node 8 brew link --overwrite node@8 --force

It will work.

Other than you can nvm to restore old version, and ensure that you need to reinstall appium.

Depends how you installed it in the first place (and your OS). I use hombrew on macOS, so it’s $ brew switch node 9.10.1.

Looks like you can do it via npm as well: https://exhesham.com/2017/12/01/how-to-downgrade-nodejs-and-npm-on-windows/