File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/pwa-kit-create-app/scripts Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ const runGenerator = () => {
132132 console . log ( `Clearing npx cache at ${ pathToNpxCache } ` )
133133 sh . rm ( '-rf' , pathToNpxCache )
134134
135+ // Clean the npm cache to avoid ECOMPROMISED errors on Windows.
136+ // The earlier `npm ci` step populates the cache with integrity hashes from the
137+ // public npm registry. When Verdaccio serves locally-built packages with different
138+ // integrity hashes, npm (especially v11+) throws ECOMPROMISED on Windows.
139+ console . log ( 'Cleaning npm cache to avoid integrity conflicts with local registry' )
140+ sh . exec ( 'npm cache clean --force' , { silent : true } )
141+
135142 console . log ( 'Running the generator' )
136143 cp . execSync (
137144 `npx ${ flags } @salesforce/pwa-kit-create-app@latest ${ process . argv . slice ( 2 ) . join ( ' ' ) } ` ,
You can’t perform that action at this time.
0 commit comments