Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Bug in version 2.8.5 #166

Open
OmarKhattab opened this issue Mar 28, 2024 · 2 comments
Open

Bug in version 2.8.5 #166

OmarKhattab opened this issue Mar 28, 2024 · 2 comments

Comments

@OmarKhattab
Copy link

Zip always results in 0 MB
Screen Shot 2024-03-28 at 12 57 16 AM

I went back to v2.5.4 and its working fine.

@fl-wxiao
Copy link

Since someone has already raised the issue, I won't repeat it again.

After some debugging, I found that the problem probably occurs here(L87):

copyProjectFile(filePath, fileName = null) {
this.init();
if (!fs.existsSync(filePath)) {
this.plugin.warn(`[warning] "${filePath}" file does not exists!`);
return true;
}
return new Promise((resolve) => {
const destFile = path.join(this.layersPackageDir, fileName || path.basename(filePath));
copyFile(filePath, destFile, (copyErr) => {
if (copyErr) throw copyErr;
return resolve();
});
});
}

In this flow, the copyProjectFile method will be called multiple times to copy multiple files. The layersPackageDir directory will be cleaned up after each entry, causing yarn --production to be unable to complete the installation correctly.

@franciszabala
Copy link

I compared the source code between 2.7.0 and 2.8.5. It looks like the code in Dependencies.js at line 24 is causing the issue. After removing it, the issue was gone.

Looks like same issue here: #168

Same fix too

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants