function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brooks Johnson 6Brooks Johnson 6 

Can Not Generate Plugins

I am trying to learn to write plugins for the Salesforce CLI. I have followed the directions to prepare your environment from the documentation (  But  after I run sfdx plugins:generate I get the error 

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: c:/Program Files (x86)/Salesforce CLI/client/node_modules/@salesforce/plugin-generator/templates/sfdxPlugin/test/tsconfig.json

I am assuming there is something wrong with my path or environment variables but I have not figured it out. I get the error in both Bash and the Windows Command Prompt.  Any help with getting this configured would be awesome. 
Tad Aalgaard 3Tad Aalgaard 3

It's probably having issues with the spaces in the path and thinks it's the end of the parameter you are passing. 

Add double quotes around your path.

"c:/Program Files (x86)/Salesforce CLI/client/node_modules/@salesforce/plugin-generator/templates/sfdxPlugin/test/tsconfig.json"
Brooks Johnson 6Brooks Johnson 6
thanks Tad, I am sure this is a  dumb question but how do I do that? I don't see the Salesforce CLI listed in my environment variables.
Tad Aalgaard 3Tad Aalgaard 3
Where is your CLI installed?  Please provide the full path.  Mine is in C:\Program Files\Salesforce CLI and my environment variable points to that location.

Try doing an update of CLI as there is a know issue in an older version -
sfdx update