-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node build -all fails on node v18 and above. #21
Comments
Does |
Yup |
I cannot look soon as having other work to do. Any help would be appreciated. |
Possible dupe of #14, but that wasn't really fixed. I will drill down more. |
Regarding |
Ok. After a npm install, npm ci runs without error in the site directory. When I last looked at this problem a few months back, I came across a change with execSync between Node 16 -> 18. I'll dig deeper on that. |
After doing the above manually... ( from the site directory, npm install and then npm ci), node build -all works from the base directory. |
Interesting. So |
We tested |
For me, it seems that the package-lock.json file extracted from the archive.zip is corrupt. It's not valid JSON. npm install works, because it overwrites the package-lock.json, but npm ci reports... "verbose shrinkwrap failed to load package-lock.json JSONParseError: Unexpected token "d" (0x64) in JSON at position 0 while parsing near "dule-transforms": {\r..."" and the package-lock.json's first line is...
So the extracted file has been truncated, as downloading the original zip from https://github.com/espocrm/espocrm/archive/stable.zip doesn't have the corruption. Stopping the build.js after the unzip and checking the extracted contents in the espocrm-stable directory shows the corruption. composer.lock is also corrupt. This is running on Windows. I'm thinking that it might be an issue with node-unzipper, there seems to be a lot of people there with open issues about extractions not working properly. I'll keep drilling. |
ZJONSSON/node-unzipper#271 is pretty revealing with the number of projects having issues... Switching out unzipper for something like adm-zip works. .then(() => {
console.log(' Unzipping...');
const archive= new AdmZip(cwd + '/site/archive.zip');
archive.extractAllTo(cwd + '/site', true);
fs.unlinkSync(cwd + '/site/archive.zip');
helpers.moveDir(
cwd + '/site/espocrm-' + branch.replace('/', '-'),
cwd + '/site'
)
.then(() => resolve());
}); |
Thanks for the help. Fix: espocrm/extension-tools@3fa2809, 22c1d65. For those who has the extension-tools dependency in their extension, it's recommended to upgrade to 0.0.4. |
Node.js v18.16.0
Node v16 is okay, but Node v16 is EOL.
The text was updated successfully, but these errors were encountered: