gpt4 book ai didi

javascript - meteor 错误: ENOTEMPTY: directory not empty

转载 作者:太空宇宙 更新时间:2023-11-04 02:05:52 31 4
gpt4 key购买 nike

当我尝试在 Meteor 中加载以下包时 https://github.com/vsivsi/meteor-job-collection

它已下载 100% 并解压,但在加载时会抛出以下错误:

{ [
Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\LALITS~1\AppData\Local\Temp\mt-16riklk\npm\job\node_modules']
errno: -4051,
code: 'ENOTEMPTY',
syscall: 'rmdir',
path: 'C:\\Users\\LALITS~1\\AppData\\Local\\Temp\\mt-16riklk\\npm\\job\\node_modules' }

我使用的是 Windows 8.1 64 位。我尝试手动删除该文件夹,但它再次创建了一个新文件夹并引发相同的错误。谁能告诉我有什么问题吗?我错过了什么吗?

提前致谢。

最佳答案

您的问题看起来像这个已知的 Meteor bug: https://github.com/meteor/meteor/issues/8663 。当更新到下一个 Meteor 版本时,Windows 下会出现此错误。

也许您可以尝试建议的解决方案,即编辑以下文件:

C:\Users\[yourName]\AppData\Local\.meteor\packages\meteor-tool\[yourMeteorVersion]\mt-os.windows.x86_32\tools\fs\files.js

...并将函数 files.rm_recursive_asyncfiles.rm_recursive 替换为以下代码:

files.rm_recursive_async = function (path) {
return new Promise(function (resolve, reject) {
rimraf(files.convertToOSPath(path), function (err) {
err && console.log(err);
resolve();
//return err ? reject(err) : resolve();
});
});
}; // Like rm -r.

files.rm_recursive = Profile("files.rm_recursive", function (path) {
try {
rimraf.sync(files.convertToOSPath(path));
} catch (e) {
if (e.code === "ENOTEMPTY" && canYield()) {
files.rm_recursive_async(path).await();
return;
}

console.log(e);
//throw e;
}
}); // Makes all files in a tree read-only.

关于javascript - meteor 错误: ENOTEMPTY: directory not empty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44364662/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com