[英]fs-extra fails with syntax error when running with systemmd, works fine with node command
[英]'fs-extra' symlink not permitted when running as administrator and with the policy added, running mklink myself works?
我正在嘗試將此插件與無服務器一起使用,以使用符號鏈接捆綁我的依賴項。 在引擎蓋下,它使用來自fs-extra
fs.symlink,如下所示:
async function link (target, f) {
await fs.ensureDir(path.dirname(f))
await fs.symlink(target, f)
.catch(e => {
if (e.code === 'EEXIST') {
return
}
throw e
})
}
但我得到operation not permitted symlink ->
即使在:
不知道該怎么做了。
您可能需要在開發人員模式下使用Windows。
否則,您需要在Windows上指定源代碼中的“聯結”類型。
async function link (target, f) {
await fs.ensureDir(path.dirname(f))
await fs.symlink(target, f, 'junction')
.catch(e => {
if (e.code === 'EEXIST') {
return
}
throw e
})
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.