eBay / digital-signature-nodejs-sdk

NodeJS SDK to generate and validate digital signatures
Apache License 2.0
9 stars 6 forks source link

Package conflict for eslint in package.json #2

Closed alexdawn closed 1 year ago

alexdawn commented 1 year ago

I am setting up the project with nvm to get a suitably new version of nodejs:

sudo apt-get install nodejs npm  # bootstrap npm
        curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash  # install nvm
        # load nvm, as instruction by the above step
        export NVM_DIR="$HOME/.nvm"
        [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
        [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
        nvm use 15.8  # needs a new enough nodejs that has an ES with the .? operator
        npm install

however during npm install I get the following error:

Now using node v15.8.0 (npm v7.5.1)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: digital-signature-nodejs-sdk@1.0.0
npm ERR! Found: eslint@6.8.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^6.8.0" from the root project
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/eslint-plugin@5.40.1
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     dev @typescript-eslint/eslint-plugin@"^5.36.1" from the root project
npm ERR!     peer @typescript-eslint/eslint-plugin@"^5.13.0" from eslint-config-airbnb-typescript@17.0.0
npm ERR!     node_modules/eslint-config-airbnb-typescript
npm ERR!       dev eslint-config-airbnb-typescript@"^17.0.0" from the root project
npm ERR!   1 more (@typescript-eslint/parser)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.32.0 || ^8.2.0" from eslint-config-airbnb-typescript@17.0.0
npm ERR! node_modules/eslint-config-airbnb-typescript
npm ERR!   dev eslint-config-airbnb-typescript@"^17.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/alex/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/alex/.npm/_logs/2022-11-17T11_42_53_934Z-debug.log

The fix requires changing "eslint-config-airbnb-typescript": "^17.0.0", to "eslint-config-airbnb-typescript": "^5.0.0", I have a fix but am unable to push a feature branch

LokeshRishi commented 1 year ago

@alexdawn I have published v2.0.0 of the SDK that downgrades Jest to v26, but increases the required NodeJS version to v16. eslint-config-airbnb-typescript is not longer a dependency.

Node version >=16 is required for Jest.

Please let me know if you are still facing issues.