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
Deborah Engelmeyer 4Deborah Engelmeyer 4 

sfdx package version is not using modified files

I created an unlocked package using 
sfdx force:package:create

Then created a version:
 
sfdx force:package:version:create

Then tried to install, had an error and fixed it, but when I created a new version using the command above, the error was still there.  Is sfdx doing something weird like using the source in an org somewhere that I don't know about, or requiring the code to be checked in to the local repository?
Raj VakatiRaj Vakati
I never tried but based on document  i think you need to pass the new version number when you are creating  new verison 

 
$ sfdx force:package:version:create -p "Your Package Alias" -k password123 --n <NEW_version>

https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_package.htm