hendt/ebay-api

The engine "node" is incompatible with this module.

doverradio opened this issue · 2 comments

I installed ebay-api on my Linux server, Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-163-generic x86_64), and got the following error when running my backend Express server...

backend# yarn install
yarn install v1.22.15
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["request@latest"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-request-2.88.2-integrity/node_modules/request" as pattern ["request@^2.88.0","request@^2.81.0","request@^2.81.0","request@^2.72.0","request@^2.72.0"]. This could result in non-deterministic behavior, skipping.
error ebay-api@7.0.0: The engine "node" is incompatible with this module. Expected version ">= 14.0.0". Got "12.22.7"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Also this error is thrown:

/node_modules/ebay-api/lib/auth/authNAuth.js:92
        return this.authToken?.eBayAuthToken ?? null;
                              ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/project/backend/node_modules/ebay-api/lib/auth/index.js:7:37)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/project/backend/node_modules/ebay-api/lib/api/index.js:6:32)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/project/backend/node_modules/ebay-api/lib/index.js:5:31)

When I visited https://yarnpkg.com/en/docs/cli/install , it advises to use yarn install, which I have done.

I have tried reinstalling several times but it always is throwing this error now.

Upgrade your node Version you have 12 at least 14 ist required. I would recommend 16.

After upgrading to Node.js version 16, everything worked without error.

Thank you!