diff --git a/scripts/publish.ts b/scripts/publish.ts index 253ed3d47d..a03f8e9160 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -490,8 +490,12 @@ async function run() { if (!stat.isDirectory()) continue await Promise.all([ - fsp.rm(path.resolve(exampleDir, 'package-lock.json')), - fsp.rm(path.resolve(exampleDir, 'yarn.lock')), + fsp.rm(path.resolve(exampleDir, 'package-lock.json'), { + force: true, + }), + fsp.rm(path.resolve(exampleDir, 'yarn.lock'), { + force: true, + }), updatePackageJson( path.resolve(exampleDir, 'package.json'), async (config) => {