error installing npm install @salesforce/sfdx-lwc-jest --save-dev

1.3k views Asked by At

I'm unable to install this, Jest Testing Framework setup please help me with is issue

Terminal:->

PS C:\Users\Akhilesh\Documents\GitHub\test-lwc>

npm install @salesforce/sfdx-lwc-jest --save-dev

npm ERR! code ETARGET npm ERR! notarget No matching version found for prettier-plugin-apex@^1.10.1. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Akhilesh\AppData\Local\npm-cache_logs\2021-11-08T07_48_01_695Z-debug.log PS C:\Users\Akhilesh\Documents\GitHub\test-lwc>

2

There are 2 answers

0
Akhilesh On

RUN > npm install [email protected] After running this you will be able to successfully run

npm install @salesforce/sfdx-lwc-jest --save-dev

0
Hassan ALAMI On

edit your package.json file, change the line

"prettier-plugin-apex": "^1.10.1"

to

"prettier-plugin-apex": "^1.10.0"