-
Notifications
You must be signed in to change notification settings - Fork 109
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
flatpak-node-generator Throws KeyError: 'integrity' #308
Comments
Looking into the issue more, I strongly suspect this has to do with running |
Closing issue since the package I'm trying to make is basically unbuildable |
Can you please provide the |
I have a case where this happens. I depend on a local library (node-argon2) through a file path: "argon2": "file:libs/node-argon2", In the lockfile (which uses "node_modules/argon2": {
"version": "0.28.3",
"resolved": "file:libs/node-argon2",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@phc/format": "^1.0.0",
"node-addon-api": "^4.2.0"
},
"engines": {
"node": ">=12.0.0"
}
}, This contains a "resolved" URI that starts with However, under the "argon2": {
"version": "0.28.3",
"requires": {
"@phc/format": "^1.0.0",
"node-addon-api": "^4.2.0"
}
}, It contains neither a I think the problem is that - for compatibility reasons - the If I force the use of So we probably either need a fix for the v1 function, or we should start using the v2 function for lockfile version 2. |
Hah, interesting, the issue above isn't present for all v2 lockfiles with Node 18, only with 18.14 due to this: nodejs/node#46542 When downgrading to a version The problem is that node 18.14 changed the way local dependencies are installed. Besides the missing integrity field, there's also the problem that transitive dependencies don't end up in the lockfile at all anymore. I guess in this case flatpak-node-generator doesn't need to do anything about it. |
Yeah, we should default to v2 syntax for lockfiles v2. Eventually we will, once the git source support is complete for v2. But for now, maybe we should add a CLI switch like |
flatpak-builder version
1.2.2
Linux distribution and version
Xubuntu 22.04 LTS x86_64
Affected flatpak-builder tool
node/flatpak-node-generator.py
flatpak-builder tool cli args
npm package-lock.json
Source repository URL
https://github.com/piskelapp/piskel
Flatpak-builder manifest URL
(Not yet created)
Description
Hello fantastic maintainers -
I'm trying to package the electron piskel app (requested on the forums) but running into trouble. I'm sure this is something silly like using the tool wrong, but I'm also hoping the tool can be improved to not crash and leave a user confused.
Here are the steps I went through with the logic:
npm install
to get thepackage-lock.json
npm install phantomjs-prebuilt@2.1.14 --ignore-scripts
to get a required dependencynpm install
againflatpak-node-generator npm package-lock.json
More potentially relevant info:
Thanks!
The text was updated successfully, but these errors were encountered: