Npm ERR! [email protected] install: `node install-npm.js`

MD101s-MacBook-Pro:screen mirror applemd101$ node -v
v8.16.0
MD101s-MacBook-Pro:screen mirror applemd101$ npm -v
6.14.5
MD101s-MacBook-Pro:screen mirror applemd101$ brew install node
Updating Homebrew…
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
earthly ffuf glooctl mockserver rust-analyzer scipy

Warning: node 14.5.0 is already installed, it’s just not linked
You can use brew link node to link this version.
MD101s-MacBook-Pro:screen mirror applemd101$ npm i -g npm
/Users/applemd101/.npm-packages/lib/node_modules/node/bin/npm -> /Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/npm/bin/npm-cli.js
/Users/applemd101/.npm-packages/lib/node_modules/node/bin/npx -> /Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/npm/bin/npx-cli.js

  • [email protected]
    updated 1 package in 16.559s
    MD101s-MacBook-Pro:screen mirror applemd101$
    MD101s-MacBook-Pro:screen mirror applemd101$
    MD101s-MacBook-Pro:screen mirror applemd101$ npm install -g appium
    ⸨ ░░░░░░░░░░⸩ ⠼ extract:zip-stream: sill tarball trying [email protected] by hash: sha512-Z9yri56Dih8IaK8
    ⸨ ░░░░░░░░░░⸩ ⠦ extract:@wdio/config: sill extract [email protected] extracted to /Users/applemd101/.npm
    /Users/applemd101/.npm-packages/lib/node_modules/node/bin/appium -> /Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/build/lib/main.js
    /Users/applemd101/.npm-packages/lib/node_modules/node/bin/authorize-ios -> /Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/node_modules/.bin/authorize-ios

[email protected] install /Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/node_modules/appium-windows-driver
node install-npm.js

/Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/node_modules/bluebird/js/release/promisify.js:270
throw new TypeError("expecting a function but got " + util.classString(fn));
^
TypeError: expecting a function but got [object Undefined]
at Function.promisify (/Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/node_modules/bluebird/js/release/promisify.js:270:15)
at Object. (/Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/node_modules/appium-support/lib/zip.js:17:20)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/Users/applemd101/.npm-packages/lib/node_modules/node/lib/node_modules/appium/node_modules/appium-support/index.js:10:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/applemd101/.npm/_logs/2020-07-24T06_58_46_416Z-debug.log

Warning: node 14.5.0 is already installed, it’s just not linked

Make sure the proper node version is active (should be 10+)

@mykola-mokhnach I have tried on node v14.7.0 and v12.16.1 , still facing same issue.

Sorry you were right. I have multiple node versions on my system, though I installed appium using node 14, it was using an older node version during execution.

HI I am getting same problem while installing appium through node js
[email protected] ~ % npm install -g appium
/usr/local/bin/authorize-ios -> /usr/local/lib/node_modules/appium/node_modules/.bin/authorize-ios
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

[email protected] install /usr/local/lib/node_modules/appium/node_modules/appium-windows-driver
node install-npm.js

/usr/local/lib/node_modules/appium/node_modules/uuid/dist/esm-browser/index.js:1
export { default as v1 } from ‘./v1.js’;
^^^^^^

SyntaxError: Unexpected token ‘export’
at wrapSafe (internal/modules/cjs/loader.js:1043:16)
at Module._compile (internal/modules/cjs/loader.js:1091:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at Object. (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/util.js:15:1)
at Module._compile (internal/modules/cjs/loader.js:1121:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at Object. (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/fs.js:12:1)
at Module._compile (internal/modules/cjs/loader.js:1121:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/amikumar/.npm/_logs/2020-08-04T13_39_34_806Z-debug.log