-
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
MODULE_NOT_FOUND error after updating to latest CLI version #3031
Comments
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. |
hi @simonhyphen8 - sf plugins uninstall @salesforce/plugin-packaging it looks like you manually installed that version, and it's quite old. Uninstalling it will make the CLI use the version it ships with rather than your older manually installed version |
@WillieRuemmele Thanks for the quick response. |
Hmmm, well that sounds like it's being returned from the server. Do you need to "Enable Unlocked Packages and Second-Generation Managed Packages"? Or anything else in the org? |
It's a scratch org connected to our dev hub which we've been using for a few years now, so I don't think it's anything like those settings. However, I will check the settings of our dev hub right now and come back to you with what I find, just to be sure. |
I discovered my access had been changed on the dev hub. Apologies. That's been resolve now, my access has been restored and the package / package version is now created. Thanks for the quick response. |
glad we got it working 😄 |
Summary
I was prompted to update to the latest version of the CLI. I did so and now when I run the following command:
sf package create --name PACKAGE_NAME --package-type Unlocked --path force-app
I receive an error message (see results)
I have tried the latest version of the CLI, and I installed an older version (2.43.3) and received the same result.
This was working a few weeks ago when I generated a new version of the package I am working with.
Steps To Reproduce
Update to latest version of CLI using
sf update
Try and run the package create command:
sf package create --name PACKAGE_NAME --package-type Unlocked --path force-app
Tip
use
sf doctor --create-issue
to automatically fill the required informationExpected result
Package version is created
File sfdx-project.json is updated with the latest version
Package is ready to be marked as published
Actual result
Error message received:
ModuleLoadError: [MODULE_NOT_FOUND] require failed to load › /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/plugin-packaging/lib/commands/package/create.js: Cannot find module 'glob' › Require stack: › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/packaging/lib/package/packageProfileApi.js › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/packaging/lib/package/packageVersionCreate.js › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/packaging/lib/package/packageConvert.js › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/packaging/lib/package/package.js › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/packaging/lib/package/index.js › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/packaging/lib/exported.js › - /Users/MYUSERNAME/.local/share/sf/node_modules/@salesforce/plugin-packaging/lib/commands/package/create.js › - /Users/MYUSERNAME/.local/share/sf/client/2.58.7-ed27925/node_modules/@oclif/core/lib/module-loader.js › - /Users/MYUSERNAME/.local/share/sf/client/2.58.7-ed27925/node_modules/@oclif/core/lib/help/index.js › - /Users/MYUSERNAME/.local/share/sf/client/2.58.7-ed27925/node_modules/@oclif/core/lib/errors/handle.js › - /Users/MYUSERNAME/.local/share/sf/client/2.58.7-ed27925/node_modules/@oclif/core/lib/errors/index.js › - /Users/MYUSERNAME/.local/share/sf/client/2.58.7-ed27925/node_modules/@oclif/core/lib/execute.js › Code: MODULE_NOT_FOUND
Additional information
System Information
Terminal = bash
OS Version = Sonoma 14.6.1 (23G93)
The text was updated successfully, but these errors were encountered: