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

Cannot use with coffeescript ! #41

Open
AlbinoGeek opened this issue Nov 6, 2017 · 1 comment
Open

Cannot use with coffeescript ! #41

AlbinoGeek opened this issue Nov 6, 2017 · 1 comment

Comments

@AlbinoGeek
Copy link

Output of meteor add arillo:flow-router-helpers

 => Errors while adding packages:

While selecting package versions:
error: Potentially incompatible change required to top-level dependency: coffeescript 1.12.7_3, was 2.0.2_1.
Constraints on package "coffeescript":
* coffeescript@1.0.4 <- arillo:flow-router-helpers 0.5.2
* coffeescript@1.0.4 <- zimme:active-route 2.3.2 <- arillo:flow-router-helpers 0.5.2

To allow potentially incompatible changes to top-level dependencies, you must pass --allow-incompatible-update on the command line.

Output of meteor list

autopublish            1.0.7  (For prototyping only) Publish the entire database to all clients
blaze-html-templates   1.1.2  Compile HTML templates into reactive UI with Meteor Blaze
coffeescript           2.0.2_1  Javascript dialect with fewer braces and semicolons
ecmascript             0.9.0  Compiler plugin that supports ES2015+ in all .js files
es5-shim               4.6.15  Shims and polyfills to improve ECMAScript 5 support
insecure               1.0.7  (For prototyping only) Allow all database writes from the client
kadira:blaze-layout    2.3.0  Layout Manager for Blaze (works well with FlowRouter)
kadira:flow-router     2.12.1  Carefully Designed Client Side Router for Meteor
meteor-base            1.2.0  Packages that every Meteor app needs
mobile-experience      1.0.5  Packages for a great mobile user experience
mongo                  1.3.0  Adaptor for using MongoDB and Minimongo over DDP
reactive-var           1.0.11  Reactive variable
shell-server           0.3.0  Server-side component of the `meteor shell` command.
standard-minifier-css  1.3.5  Standard css minifier used with Meteor apps by default.
standard-minifier-js   2.2.1  Standard javascript minifiers used with Meteor apps by default.
tracker                1.1.3  Dependency tracker to allow reactive callbacks
@AlbinoGeek
Copy link
Author

AlbinoGeek commented Nov 6, 2017

The problem is your package.js file using an old version of coffeescript @1
Current coffeescript package is @2. I've stopped using this package now.

pathFor = (path, view = {hash:{}}) ->
  throw new Error('no path defined') unless path
  # set if run on server
  view = hash: view unless view.hash
  if path.hash?.route?
    view = path
    path = view.hash.route
    delete view.hash.route
  query = if view.hash.query then FlowRouter._qs.parse(view.hash.query) else {}
  hashBang = if view.hash.hash then view.hash.hash else ''
  FlowRouter.path(path, view.hash, query) + (if hashBang then "##{hashBang}" else '')

Template.registerHelper 'pathFor', pathFor

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

No branches or pull requests

1 participant