Open dschach opened 2 months ago
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.
This would be owned by the VSCode extensions team. I will transfer it over.
I am not seeing any other reports of this on their Issues repo so it could be a bad install? I would try fully uninstalling (and reinstalling) the VSCode extensions and the CLI.
@dschach Please follow these steps For Mac and Linux, run the following:
For Windows, run the following:
If you have two different versions for sfdx --version and sf --version, follow these instructions to uninstall the CLI from both the installer and NPM, then reinstall the latest version of the CLI using one of those methods.
/usr/local/bin/sfdx
/usr/local/bin/sf
sfdx --version
@salesforce/cli/2.58.7 darwin-arm64 node-v20.17.0
sf --version
@salesforce/cli/2.58.7 darwin-arm64 node-v20.17.0
Hi
I am experiencing the same issue with my setup. I have downgraded the package as was suggested on stackexchange but no change.
Have tried using the expanded pack with the same result.
which sfdx /usr/local/bin/sfdx
which sf
/usr/local/bin/sf
sfdx --version @salesforce/cli/2.58.7 darwin-arm64 node-v20.17.0
sf --version @salesforce/cli/2.58.7 darwin-arm64 node-v20.17.0
@dschach @Telfie70 Can you try cleaning out all the existing and old versions of your Salesforce extensions in VSCode and then reinstalling the extensions?
This is how to do that:
.vscode/extensions
from the home directory.rm -rf salesforce.salesforcedx*
to delete all the Salesforce extensions.Hi @daphne-sfdc I also have the same issue. I run the codes you told in the git bash, cleared all extensions and re-installed them. Still have the issue.
where sfdx C:\Program Files\sf\bin\sfdx C:\Program Files\sf\bin\sfdx.cmd
where sf C:\Program Files\sf\bin\sf C:\Program Files\sf\bin\sf.cmd
sfdx version sf version @salesforce/cli/2.58.7 win32-x64 node-v20.17.0
@YavuzCemal Please go to your User settings.json and add "json.schemas": []
to the end of that file, then reload the VSCode window. Let me know if that fixes the issue!
@daphne-sfdc problem solved. ty.
@YavuzCemal Great to hear your problem is now resolved! 🎊
@dschach @Telfie70 If cleaning and reinstalling your extensions doesn't work, please also try adding "json.schemas": []
to your User settings.json.
@daphne-sfdc Did all that. Deleted directory. Installed extended pack. Got an error that one of the extensions requires the regular pack. Installed the regular pack as well. Added json.schema to settings. Opened project-scratch-def.json and still got the error.
It's asking for a folder called @salesforce
and that's what isn't present.
@dschach
Two questions:
I see a warning in my Problems tab and everything was working fine for me, so I was wondering about the impact of this issue from your side.
It's not a blocker, but it's there and I figured the team would like to know :) It's orange, so a warning, I think. I'm still able to do my work - just unsure why it's happening and what part of the extension pack is looking for something that's not there. Thanks for looking into this
This issue has been linked to a new work item: W-16771336
Hello everyone, Multiple members of our team are seeing this warning, and we have concluded that it is a bug. We'll keep you updated on the status of fixing this bug in this issue.
Hi @daphne-sfdc
I have removed the files and then reinstalled and still got the error.
I added "json.schemas": [] and still got the error
_Unable to load schema from '/Users/xxxx/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json': ENOENT: no such file or directory, open '/Users/xxxx/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/nodemodules/@salesforce/schemas/sfdx-project.schema.json'.
I was able to authorise the org so it might be ok functionality wise but will only find out for sure once I start getting into the details.
This issue is not resolved with "json.schemas": []
for me either.
I have been able to resolve this by simply adding the schemas
manually to the extension folders. I can confirm, that there is no @salesforce/schemas
in the relevant folder.
I used the schemas from the official schemas repo - no clue if there is a more up-to-date version.
❗ Snippets written for Mac, but should be easy to adapt to Windows/Linux. Obviously, you need to copy the exact location that it is looking for - replace Jannis.Schreiber
with your username and 62.3.1
with your extension version. I basically copied the path from the inline error message that is thrown by VS Code.
SFDX Project Schema
wget https://raw.githubusercontent.com/forcedotcom/schemas/refs/heads/main/sfdx-project.schema.json && mv sfdx-project.schema.json /Users/Jannis.Schreiber/.vscode/extensions/salesforce.salesforcedx-vscode-core-62.3.1/node_modules/@salesforce/schemas/sfdx-project.schema.json
Scratch Def Schema
wget https://raw.githubusercontent.com/forcedotcom/schemas/refs/heads/main/project-scratch-def.schema.json && mv project-scratch-def.schema.json /Users/Jannis.Schreiber/.vscode/extensions/salesforce.salesforcedx-vscode-core-62.3.1/node_modules/@salesforce/schemas/project-scratch-def.schema.json
✅ Restart VS Code and you should be ready. Here's a screenshot with working auto-complete from the schema.
Summary
Error shown when viewing scratch org definition file or sfdx-project.json in VSCode.
(Note: I cannot find the
/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce
folder on my MacOs computer. I found node_modules, but not @salesforce.)Steps To Reproduce
I can't show a repository because this is not repository-based.
It happens in multiple projects, for multiple files. There is an error that says
Unable to load schema from '/Users/dschach/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/project-scratch-def.schema.json': ENOENT: no such file or directory, open '/Users/dschach/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/project-scratch-def.schema.json'.
It also happens when I open sfdx-project.json:
Unable to load schema from '/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json': ENOENT: no such file or directory, open '/Users/myuser/.vscode/extensions/salesforce.salesforcedx-vscode-core-61.12.0/node_modules/@salesforce/schemas/sfdx-project.schema.json'.
Expected result
Actual result
Additional information
System Information