Skip to content
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

Building for Meteor 1.5 (not semver) #103

Closed
KoenLav opened this issue May 31, 2017 · 5 comments
Closed

Building for Meteor 1.5 (not semver) #103

KoenLav opened this issue May 31, 2017 · 5 comments
Assignees
Milestone

Comments

@KoenLav
Copy link
Contributor

KoenLav commented May 31, 2017

Building for Meteor 1.5 will produce an error first because:

release = release.match(/(^\d+.\d+.\d+)/gmi)[0];

won't match 1.5 (would only match 1.5.0), which is followed with an error in 'checkMeteorVersion':

if (!_semver2.default.satisfies(release, versionRange))

because 1.5 is not semver.

Exactly the same errors pop up within 'chooseStrategy'.

After manually bypassing all of these though, Meteor 1.5 appears to work just fine!

@sferoze
Copy link

sferoze commented May 31, 2017

@KoenLav I got this same error when trying to build after updating! But I didn't have time to look into it. I got some kind of error specifying cannot read [0] of undefined (something like that, cant quite remember)

How did you get it to work? Manually bypassing error? How did you do that?

Would you just have to change the release version in .meteor folder to 1.5.0?

@KoenLav
Copy link
Contributor Author

KoenLav commented May 31, 2017

@sferoze I manually edited the code in node_modules/meteor-desktop/dist.

If you look at the error messages you'll be able to figure out where the errors arise from and you can comment that code (as the code is only used to do version checking for Meteor, and you know you're using the right version).

This is not a production ready fix, hence I didn't save the code or anything.

@wojtkowiak wojtkowiak added the bug label Jun 1, 2017
wojtkowiak added a commit that referenced this issue Jun 7, 2017
Fix bug #103 - cast Meteor release to semver version so it passes the checks
@wojtkowiak wojtkowiak added this to the 0.7.2 milestone Jun 10, 2017
@wojtkowiak
Copy link
Owner

Better version checking is now released in v0.7.2

@KoenLav
Copy link
Contributor Author

KoenLav commented Jun 15, 2017

Works fine with Meteor 1.5 now!

@KoenLav KoenLav closed this as completed Jun 15, 2017
@Farkal
Copy link

Farkal commented Sep 26, 2017

I get a new error now:

ERROR  meteorApp:  error occurred during checking preconditions:  TypeError: Cannot read property '0' of null
    at MeteorApp.castMeteorReleaseToSemver (C:\MyAPP\node_modules\meteor-desktop\dist\meteorApp.js:362:83)
    at MeteorApp.checkMeteorVersion (C:\MyAPP\node_modules\meteor-desktop\dist\meteorApp.js:373:32)
    at MeteorApp._callee3$ (C:\MyAPP\node_modules\meteor-desktop\dist\meteorApp.js:441:42)

I don't know how this is possible but after inspecting the code I find that the concatenation of the function this.getMeteorRelease() and .0.0 result only on .0.0.
I check the type of the result of the function it was string so after some time i just convert it in float before the concatenation and it work.
So this return (this.getMeteorRelease() + '.0.0').match(/(^\d+\.\d+\.\d+)/gmi)[0]; become this return (parseFloat(this.getMeteorRelease()) + '.0.0').match(/(^\d+\.\d+\.\d+)/gmi)[0]; on dist/meteorApp.js at line 362

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

No branches or pull requests

5 participants