-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Salesforce CLI link plugin issue #2915
Comments
Hello @JaniszewskiMarcin 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
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? |
Below you can find an output: (node:32552) [DEP0040] DeprecationWarning: The |
That's a typescript error but could it be that you have a |
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. |
Hello, So now to be clear what is happening inside my plugin here is package.json content: In post-install I have command "tsc -p ." that throws the main errors:
My file with tsconfig.json: So now somehow I have to fix dependencies in package.json or tsconfig.json to make it work only from running "npm i" and I can not understand why something in @salesforce/core package in node_modules which installed automatically is working in a wrong way and trying to reference member of library that is deprecated? Any ideas? |
can you share your plugin code? Or the scripts that you're using? I'm trying to understand what's referring to |
For plugin we only use import { Messages } from '@salesforce/core'; in typeScript files. That error is happening when trying to compile files in plugin in typeScript to .js with command "tsc -p ." even If I added to tsconfig.json to exclude folder "node_modules". The error is clearly in those two files:
Bu then I can not understand why it is not fixed in @salesforce/core that it try to use deprecated 'JwtOAuth2Config' or is it somehow our plugin side but we do not even once use any of those statements only "{ Messages } from '@salesforce/core';". |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
Hey @JaniszewskiMarcin , maybe adding package-lock.json to your repository could help. |
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.
The text was updated successfully, but these errors were encountered: