We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
fs-extra
1 parent ab7b0f5 commit ebcc855Copy full SHA for ebcc855
scripts/install-native.mjs
@@ -2,7 +2,7 @@ import os from 'os'
2
import path from 'path'
3
import execa from 'execa'
4
import fs from 'fs'
5
-import fsp from 'fs/promises'
+import { move } from 'fs-extra'
6
;(async function () {
7
if (process.env.NEXT_SKIP_NATIVE_POSTINSTALL) {
8
console.log(
@@ -71,8 +71,7 @@ import fsp from 'fs/promises'
71
const from = path.join(tmpdir, 'node_modules/@next', pkg)
72
const to = path.join(cwd, 'node_modules/@next', pkg)
73
// overwriting by removing the target first
74
- await fsp.rm(to, { recursive: true, force: true })
75
- return fsp.rename(from, to)
+ return move(from, to, { overwrite: true })
76
})
77
)
78
fs.rmSync(tmpdir, { recursive: true, force: true })
0 commit comments