We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e853e94 commit adc2417Copy full SHA for adc2417
scripts/prepublishOnly.js
@@ -72,9 +72,13 @@ async function main(argv = process.argv) {
72
// This will be `prepublishOnly/@org/name-platform-arch`
73
const packagePath = path.join(prepublishOnlyPath, packageName);
74
console.error('Packaging:', packagePath);
75
- await fs.promises.rm(packagePath, {
76
- recursive: true,
77
- });
+ try {
+ await fs.promises.rm(packagePath, {
+ recursive: true,
78
+ });
79
+ } catch (e) {
80
+ if (e.code !== 'ENOENT') throw e;
81
+ }
82
await fs.promises.mkdir(packagePath, { recursive: true });
83
const nativePackageJSON = {
84
name: packageName,
0 commit comments