I’m using a project with the module peerlibrary:reactive-publish which requires a minimum version of coffeescript@2.0.3_3
I’d like to add the module nimble:restivus to expose a rest api to users. But unfortunately, I get an error message that coffeescript@1.0.2 is required.
- Why does nimble:restivus need version 1.0.2 I cannot see any specific version requirement in the packages.js file in GitHub.
- What are my best alternatives restivus has not been touched in 2 years, has 8 merge requests and 110 open issues? simple-rest seems to be the best alternative option but it looks like it’s a lot harder to setup and I need to add a decorator around each current method to store some meta data when using the Rest API.
Have you tried meteor add nimble:restivus --allow-incompatible-update
?
Yes and it worked.
I was mostly curious why it would not install given the package.js
file in the project seemed to have no reference to a coffeescript version.
I’m not sure, but I have a feeling it’s because the last release of nimble:restivus
was just before the Meteor v1.4.3 release, when the coffeescript
package was moved to non-core and version constraint rules changed. Having said that, the version of coffeescript
at that point was (I think) 1.9.2 
Have you looked at simple:json-routes
?
The answer (albeit discussing practicalmeteor:mocha
) is in the release notes for v1.8. It’s basically that the api.versionsFrom('0.9')
in nimble:restivus
constrains the coffeescript
version.:
The .meteor/packages
file supports a new syntax for overriding problematic version constraints from packages you do not control.
If a package version constraint in .meteor/packages
ends with a !
character, any other (non- !
) constraints on that package elsewhere in the application will be weakened to allow any version greater than or equal to the constraint, even if the major/minor versions do not match.
For example, using both CoffeeScript 2 and practicalmeteor:mocha
used to be impossible (or at least very difficult) because of this api.versionsFrom("1.3")
statement, which unfortunately constrained the coffeescript
package to version 1.x. In Meteor 1.8, if you want to update coffeescript
to 2.x, you can relax the practicalmeteor:mocha
constraint by putting
coffeescript@2.2.1_1! # note the !
in your .meteor/packages
file. The coffeescript
version still needs to be at least 1.x, so that practicalmeteor:mocha
can count on that minimum. However, practicalmeteor:mocha
will no longer constrain the major version of coffeescript
, so coffeescript@2.2.1_1
will work.
1 Like
I did and did not really like it as much as the restivus implementation.
Thanks for pointing out the issue in the release notes.