Issue with prettier-plugin-apex@^1.10.1 npm install on new SFDX project
forcetrekker opened this issue · 8 comments
Summary
After creating a new project with SFDX: Create Project with Manifest
, when running npm install
, we get an error
No matching version found for prettier-plugin-apex@^1.10.1.
Steps To Reproduce:
Create a new project with SFDX: Create Project with Manifest
command and run npm install
.
Expected result
No errors in command line and NPM command must be executed successfully
Actual result
Installation fails due to prettier-plugin-apex
's version issue.
System Information
$ sfdx version --verbose --json
{
"cliVersion": "sfdx-cli/7.120.0",
"architecture": "win32-x64",
"nodeVersion": "node-v14.18.0",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.3 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/lwc-dev-server 2.11.0",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"alias 1.1.10 (core)",
"apex 0.2.9 (core)",
"auth 1.7.1 (core)",
"config 1.2.35 (core)",
"custom-metadata 1.0.12 (core)",
"data 0.6.1 (core)",
"generator 1.2.0 (core)",
"limits 1.2.1 (core)",
"org 1.8.0 (core)",
"salesforce-alm 52.3.5 (core)",
"schema 1.0.8 (core)",
"sfdx-cli 7.120.0 (core)",
"source 1.2.0 (core)",
"telemetry 1.2.4 (core)",
"templates 52.2.0 (core)",
"trust 1.0.8 (core)",
"user 1.5.0 (core)"
],
"osVersion": "Windows_NT 10.0.19043"
}
Additional information
output in windows 10:
$ npm i
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
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! notarget
npm ERR! notarget It was specified as a dependency of 'my-project'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\rahul\AppData\Roaming\npm-cache\_logs\2021-10-24T23_05_37_746Z-debug.log
```
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
checking the NPM module for prettier-plugin-apex, latest version is 1.10.0
.
Workaround is to manually modify the dependencies in package.json
from "prettier-plugin-apex": "^1.10.1 "
to "prettier-plugin-apex": "^1.10.0"
, but proper fix will be to have a correct version in package.json
file after creating a new project with SFDX: Create Project with Manifest
command.
This looks to be a duplicate of #394.
Same issue here!
@quinnmcphail But is not fixed yet. If you follow the topic it looks like the PR with the fix is merged to main, but it is not. I don't where the change or the merge is missing but the truth is that it not fixed and there is not PR opened with the fix.
The PR actually got closed, but @jag-sfdc mentioned that it was merged. I don't see the changes though.
@quinnmcphail I think @jag-sfdc means it was merged or fixed before. Your PR is not merged, github says "closed" not "merged". In August the 3rd it was fixed in this PR: #353 but in September the 27th the change was overwritten in this other PR: #374 that's why we still have the error.
Could you please @quinnmcphail open a new PR to fix it?
Thanks!
This appears to be fixed with the most recent release.