Closed JaniszewskiMarcin closed 3 weeks ago
Hello @JaniszewskiMarcin :wave: It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json
for the CLI you're using (sf
or sfdx
).
A few more things to check:
rc
or nightly
versions. (docs)doctor
command to diagnose common issues.Thank you!
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.
could you run the command with this env var set and share the output?
DEBUG=@oclif/plugin-plugins*
Below you can find an output:
(node:32552) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
@oclif/plugin-plugins installing dependencies with npm +0ms
@oclif/plugin-plugins:npm npm binary path C:\Users\marcin.janiszewski\AppData\Roaming\npm\node_modules\@salesforce\cli\node_modules\npm\bin\npm-cli.js +0ms
@oclif/plugin-plugins:npm C:\Users\marcin.janiszewski\Desktop\Repositories\sfdx-project: C:\Users\marcin.janiszewski\AppData\Roaming\npm\node_modules\@salesforce\cli\node_modules\npm\bin\npm-cli.js install --no-audit --loglevel=silent --no-fund +0ms
@oclif/plugin-plugins:spawn modulePath node +0ms
@oclif/plugin-plugins:spawn args [
'"C:\Users\marcin.janiszewski\AppData\Roaming\npm\node_modules\@salesforce\cli\node_modules\npm\bin\npm-cli.js"',
'install',
'--no-audit',
'--loglevel=silent',
'--no-fund'
] +0ms
@oclif/plugin-plugins:spawn node_modules/@salesforce/core/lib/org/authInfo.d.ts(3,10): error TS2724: '"jsforce"' has no exported member named 'JwtOAuth2Config'. Did you mean 'OAuth2Config'? +8s
@oclif/plugin-plugins:spawn node_modules/@salesforce/core/lib/webOAuthServer.d.ts(3,10): error TS2724: '"jsforce"' has no exported member named 'JwtOAuth2Config'. Did you mean 'OAuth2Config'? +0ms
@oclif/plugin-plugins:npm npm error CLIError: node "C:\Users\marcin.janiszewski\AppData\Roaming\npm\node_modules\@salesforce\cli\node_modules\npm\bin\npm-cli.js" install --no-audit --loglevel=silent --no-fund exited with code 2
at ChildProcess.
That's a typescript error but sf plugins link
doesn't build your plugin when you link it 🤔
could it be that you have a postinstall
script in your plugin that tries to build it? if so, you might need to fix the error in your plugin first.
Ticket to be closed indeed there was deprecated member named 'JwtOAuth2Config' should be 'OAuth2Config' in my scripts. Main issue was that in Visual Studio Code search function do not scan all the files and I assumed we do not have any of those variables or at least not on our side. Thanks for help!
Since problem is resolved I'am closing the issue.
Summary
When updating CLI version to the latest one we can not link plugins. Error message: "@salesforce/cli: Linking plugin ../pluginName... ! › Error: /usr/local/lib/node_modules/@salesforce/cli/node_modules/npm/bin/np › m-cli.js install --no-audit --loglevel=silent --no-fund exited with code 2 › Try this: Run with DEBUG=@oclif/plugin-plugins* to see debug output."
We start to observe this errors happening from version 2.35.6 (April 3, 2024) and even now the newest version 2.44.8 (Jun 5, 2024) [stable] still causes same issues.
Steps To Reproduce
Expected result
Proper plugin linking.
Actual result
Plugin is not linked and can not be use in other parts of script.
System Information
Additional information
No additional information.