-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TypeError: s.trim is not a function on rpm and deb target #1784
Comments
Oh, I think I know what's going on! We manually override the versions of rpm and deb packages by using
@develar recently changed |
BTW, we do some minor transformations to version strings to make them rpm or deb compatible:
I wonder if In this case, we replace |
Hm, even though export function coerceTypes(host: any): any {
for (const key of Object.getOwnPropertyNames(host)) {
const value = host[key]
if (value === "true") {
host[key] = true
}
else if (value === "false") {
host[key] = false
}
else if (value === "null") {
host[key] = null
}
else if (value != null && typeof value === "object") {
coerceTypes(value)
}
}
return host
} It looks like a version string should remain a string. |
How odd! This is how version: [ '1.0.0+541ee65', '1.0.0+541ee65' ], |
The value seems to come that way from the |
This is what
|
Oh, I get it. If the metadata already contains a property |
|
@jviotti Does that also mean that for the builds where we turn off updates, we get EDIT: Ah, nope. Looks like the problem here is because we're actually setting |
@lurch is right. I think there is a confusion about the root cause of this issue. We have a package.json that contains a version: {
"version": "1.0.0"
} If we then also pass {
"version": [ "1.0.0", "2.0.0" ]
} So basically, if we try to override a value from package.json using |
This used to work before (I'll try to bisect if I have time), which is why I think a bug report is appropriate. |
@jviotti Please re-read my message carefully ;-) Instead, I think that the error is that we're using Like I said I haven't actually tested this though, so please accept my apologies if I'm wrong! |
I'll let you off this time @jviotti 😆 😆 😉 |
I'm suddenly getting the following issue while upgrading from 18.6.2 to 19.9.1:
The stack trace leads me to this line:
Which means that somehow
metadata.version
is not a string, only on the deb and rpm targets (all other targets seem to work fine).Check https://travis-ci.org/resin-io/etcher/jobs/249658677
Here's the
electron-builder.yml
configuration file: https://github.com/resin-io/etcher/blob/541ee6505b768750eb2cb2ece58ae3261281a5e8/electron-builder.ymlThe text was updated successfully, but these errors were encountered: