In my environment we cannot use yarn to do a prepack on a custom dx plugin. So, we are trying to do the equivalent of yarn prepack with npm run prepack

In the latter case, the typescript compiler continues to fail saying

MissingBundleError Plugin: @mynpmscope/myplugin: Missing bundle myplugin:mycommand for local en_US

I've tried to change my prepack script to create a lib folder and recursively copy the JSON files to a new messages subfolder under lib

My prepack script: "prepack": "rimraf lib && mkdir lib && cp -R ./messages ./lib/messages && tsc -b && oclif-dev manifest && oclif-dev readme"

but still it fails. Is there a change I need to make in my package.json in order for the compiler to look elsewhere? Maybe the files section of the JSON?

Any pointers would be appreciated. Thanks!

1 Answer 1


This GitHub page details the issue: https://github.com/forcedotcom/sfdx-plugin-generate/issues/59

In my case, I still had the old name without the scope as the first argument in each Messages.loadMessage(), so Messages.loadMessage('myplugin','myhelpfile') instead of Messages.loadMessage('@mynpmscope/myplugin','myhelpfile')

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .