Skip to content
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

fix: ignore cache when reading user pjson #1124

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Jun 25, 2024

Ignore the ProdOnlyCache when reading the user pjson because it could have been modified by a JIT install

Fixes issue with first execution of a JIT plugin failing with this error:

sf dev generate library                               
@salesforce/cli: Installing plugin dev@2.3.2... installed v2.3.2
 ›   ModuleLoadError: [MODULE_NOT_FOUND] import() failed to load /Users/peter.hale/.npm-global/lib/node_modules/@salesforce/cli/lib/commands/dev/generate/library.js: Cannot find module 
 ›   '/Users/peter.hale/.npm-global/lib/node_modules/@salesforce/cli/lib/commands/dev/generate/library.js' imported from /Users/peter.hale/.npm-global/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/module-loader.js
 ›   Code: MODULE_NOT_FOUND

Testing

  1. Checkout branch, yarn build
  2. cd to sf repo
  3. yarn link @oclif/core
  4. yarn oclif manifest
  5. bin/run.js dev generate plugin

It should JIT install plugin-dev and successfully run the dev generate plugin command

@mdonnalley mdonnalley added the enhancement New feature or request label Jun 25, 2024
Copy link

git2gus bot commented Jun 25, 2024

This issue has been linked to a new work item: W-16094608

@mshanemc
Copy link
Member

QA notes:
✅ works as expected.
📓 I had to point the yarn/oclif from my CLI source repo to the "real" CLI I use from the installer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants