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

Error on Meteor Update 1.6.1 when using practicalmeteor:mocha #33

Closed
nonfungibletunji opened this issue Feb 25, 2018 · 48 comments
Closed

Comments

@nonfungibletunji
Copy link

localCollectionLimit = new ReactiveVar(null);

Meteor 1.6.1 does not see the ReactiveVar inside the atmosphere package.
W20180225-07:01:23.344(-5)? (STDERR) ReferenceError: ReactiveVar is not defined
W20180225-07:01:23.344(-5)? (STDERR) at _fn (packages/peerlibrary_reactive-publish.js:421:5)

@mitar
Copy link
Member

mitar commented Feb 25, 2018

That's a bug in your app. This package is not using ReactiveVar.

@mitar
Copy link
Member

mitar commented Feb 25, 2018

(It uses it only in tests. And dependency is defined here.)

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 25, 2018 via email

@mitar
Copy link
Member

mitar commented Feb 25, 2018

But the dependency is defined in package.js.

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 25, 2018 via email

@mitar
Copy link
Member

mitar commented Feb 25, 2018

Just packages versions uses from 1.4

Anyway, I cannot reproduce your issue. I ran this on Meteor 1.6.1 and tests work for me.

@mitar
Copy link
Member

mitar commented Feb 25, 2018

So please create a small reproduction.

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 25, 2018 via email

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 25, 2018 via email

@mitar
Copy link
Member

mitar commented Feb 25, 2018

OK, but can you make a small app where this is failing like you are describing?

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 25, 2018 via email

@atomoc
Copy link

atomoc commented Feb 27, 2018

I have the same!
2018-02-27 11-13-30

@atomoc
Copy link

atomoc commented Feb 27, 2018

And on command meteor update --all-packages:

This project is already at Meteor 1.6.1, the latest release.
=> Errors while upgrading packages:           
                                              
While selecting package versions:
error: Conflict: Constraint coffeescript@1.0.4 is not satisfied by coffeescript 2.2.1_1.
Constraints on package "coffeescript":
* coffeescript@1.0.4 <- zimme:collection-timestampable 1.0.9
* coffeescript@1.0.4 <- zimme:collection-behaviours 1.1.3 <- zimme:collection-timestampable 1.0.9
* coffeescript@2.0.3_3 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:fiber-utils 0.9.1 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:fiber-utils 0.9.1 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:extend-publish 0.5.0 <- peerlibrary:reactive-publish 0.6.0

@atomoc
Copy link

atomoc commented Feb 27, 2018

And:

$ meteor add peerlibrary:reactive-publish@0.6.0
 => Errors while adding packages:             
                                              
While selecting package versions:
error: Conflict: Constraint coffeescript@1.0.4 is not satisfied by coffeescript 2.0.3_4.
Constraints on package "coffeescript":
* coffeescript@1.0.4 <- zimme:collection-timestampable 1.0.9
* coffeescript@1.0.4 <- zimme:collection-behaviours 1.1.3 <- zimme:collection-timestampable 1.0.9
* coffeescript@2.0.3_3 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:fiber-utils 0.9.1 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:fiber-utils 0.9.1 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:extend-publish 0.5.0 <- peerlibrary:reactive-publish 0.6.0

@atomoc
Copy link

atomoc commented Feb 27, 2018

It is necessary to refrain while from using.

@mitar
Copy link
Member

mitar commented Feb 27, 2018

So nobody willing to create a reproduction?

@mitar
Copy link
Member

mitar commented Feb 27, 2018

Because things work for me:

$ meteor create test-app
Created a new Meteor app in 'test-app'.       

To run your new app:                          
  cd test-app                                 
  meteor                                      
                                              
If you are new to Meteor, try some of the learning resources here:
  https://www.meteor.com/tutorials            
                                              
meteor create --bare to create an empty app.  
meteor create --full to create a scaffolded app.
                                              
$ cd test-app/
$ meteor add peerlibrary:reactive-publish
                                              
Changes to your project's package version selections:
                                              
coffeescript                  added, version 2.0.3_4
coffeescript-compiler         added, version 2.0.3_4
peerlibrary:assert            added, version 0.2.5
peerlibrary:extend-publish    added, version 0.5.0
peerlibrary:fiber-utils       added, version 0.9.1
peerlibrary:reactive-mongo    added, version 0.2.2
peerlibrary:reactive-publish  added, version 0.6.0
peerlibrary:server-autorun    added, version 0.7.1

                                              
peerlibrary:reactive-publish: Reactive publish endpoints
$ meteor           
[[[[[ .../test-app ]]]]]                   

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/

@atomoc
Copy link

atomoc commented Feb 27, 2018

Version of the meteor what?

@mitar
Copy link
Member

mitar commented Feb 27, 2018

@atomoc, I do not understand your question.

@atomoc
Copy link

atomoc commented Feb 27, 2018

Meteor v.1.6.1 ?

@mitar
Copy link
Member

mitar commented Feb 27, 2018

Yes, this is what I just ran, which uses Meteor 1.6.1 by default. Please try to create a small reproduction yourself and put a repo on GitHub.

@atomoc
Copy link

atomoc commented Feb 27, 2018

On a clean project with the same package.json and .meteor/packages files everything is ok, until I can understand what the problem is.

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 27, 2018 via email

@mitar
Copy link
Member

mitar commented Feb 27, 2018

@stunjiturner, so does it work for you or no? I do not understand.

@nonfungibletunji
Copy link
Author

nonfungibletunji commented Feb 27, 2018 via email

@mitar
Copy link
Member

mitar commented Feb 27, 2018

OK. So please find what is the difference and make a reproduction. It works for me, so I cannot really help until we can at least have a small example.

@atomoc
Copy link

atomoc commented Feb 27, 2018

I tried to use ReactiveVar yesterday, but I got errors. Clearly something is not so simple with him.

@atomoc
Copy link

atomoc commented Feb 27, 2018

@mitar Here need a large reproduction most likely

@atomoc
Copy link

atomoc commented Feb 27, 2018

I think the problem is in Cordova

@janat08
Copy link

janat08 commented Mar 5, 2018

@brendonboshell
Copy link

This issue seems to happen when other conflicting packages have been installed, perhaps due to the way Meteor resolves conflicting dependencies? For example, having both 'practicalmeteor:mocha' and 'peerlibrary:reactive-publish' packages will result in this error.

To replicate:

  1. meteor create simple-todos --release 1.6.1
  2. cd simple-todos
  3. meteor add practicalmeteor:mocha
  4. meteor add peerlibrary:reactive-publish
  5. meteor --inspect-brk

image

It seems the tests.coffee.js file is included, which results in the ReactiveVar is not defined error.

Meteor decides to install 0.4.0:

$ 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
ecmascript                    0.10.5  Compiler plugin that supports ES2015+ in all .js files
es5-shim                      4.7.3  Shims and polyfills to improve ECMAScript 5 support
insecure                      1.0.7  (For prototyping only) Allow all database writes from the client
meteor-base                   1.3.0  Packages that every Meteor app needs
mobile-experience             1.0.5  Packages for a great mobile user experience
mongo                         1.4.5  Adaptor for using MongoDB and Minimongo over DDP
peerlibrary:reactive-publish  0.4.0* Reactive publish endpoints
practicalmeteor:mocha         2.4.5_6  Write package tests with mocha and run them in the browser or from the command line with spacejam.
reactive-var                  1.0.11  Reactive variable
shell-server                  0.3.1  Server-side component of the `meteor shell` command.
standard-minifier-css         1.4.1  Standard css minifier used with Meteor apps by default.
standard-minifier-js          2.3.2  Standard javascript minifiers used with Meteor apps by default.
tracker                       1.1.3  Dependency tracker to allow reactive callbacks

Running meteor add peerlibrary:reactive-publish@0.6.0 results in:

 => Errors while adding packages:             
                                              
While selecting package versions:
error: Conflict: Constraint coffeescript@1.0.4 is not satisfied by coffeescript 2.0.3_4.
Constraints on package "coffeescript":
* coffeescript@1.0.4 <- practicalmeteor:mocha 2.0.1-rc0
* coffeescript@2.0.3_3 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:fiber-utils 0.9.1 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-mongo 0.2.2 <-
peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:fiber-utils 0.9.1 <- peerlibrary:server-autorun 0.7.1 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:reactive-mongo 0.2.2 <- peerlibrary:reactive-publish 0.6.0
* coffeescript@2.0.3_3 <- peerlibrary:extend-publish 0.5.0 <- peerlibrary:reactive-publish 0.6.0

Conflict: Constraint spacejamio:chai@1.9.2_2 is not satisfied by spacejamio:chai 1.0.0.
Constraints on package "spacejamio:chai":
* spacejamio:chai@1.9.2_2 <- practicalmeteor:mocha 2.0.1-rc0

@knirirr
Copy link

knirirr commented Apr 14, 2018

I'm seeing the same issue as @brendonboshell and can reproduce the same crash with the simple-todos as mentioned above. What I can't manage at the moment is to get node-inspector installed, apparently due to this issue: node-inspector/v8-debug#41

@knirirr
Copy link

knirirr commented May 5, 2018

If anyone has had any luck in finding a solution to this I'd be very interested to hear it.

Meanwhile, I note that an older version of my application using Meteor 1.6-beta.26 does not show this problem, so it does indeed seem to be related to 1.6.1.

@mitar
Copy link
Member

mitar commented May 5, 2018

I am using this package with 1.6.1.1 without any problems. I think the issue is in practicalmeteor:mocha which is forcing an old CoffeeScript version. It should be updated to CoffeeScript 2.

I am using meteortesting:mocha which works well.

@mitar
Copy link
Member

mitar commented May 5, 2018

Not sure why it is not picking 0.5.0 though for you. That version of this package uses CoffeeScript 1 and works well.

@mitar
Copy link
Member

mitar commented May 5, 2018

See issue here: practicalmeteor/meteor-mocha#99

@mitar
Copy link
Member

mitar commented May 5, 2018

And: practicalmeteor/meteor-mocha#91

@mitar
Copy link
Member

mitar commented May 5, 2018

So can somebody try meteor add peerlibrary:reactive-publish@0.5.0 and report what happens?

@mitar
Copy link
Member

mitar commented May 5, 2018

Ah, you get:

While selecting package versions:
error: Conflict: Constraint babel-compiler@6.13.0 is not satisfied by babel-compiler 7.0.8.
Constraints on package "babel-compiler":
* babel-compiler@~7.0.6 <- top level
* babel-compiler@7.0.0 <- ecmascript 0.10.8
* babel-compiler@7.0.0 <- minifier-js 2.3.4 <- standard-minifier-js 2.3.3
* babel-compiler@7.0.0 <- standard-minifier-js 2.3.3
* babel-compiler@6.13.0 <- coffeescript 1.11.1_3 <- peerlibrary:extend-publish 0.4.0 <- peerlibrary:reactive-publish 0.5.0
* babel-compiler@6.13.0 <- coffeescript 1.11.1_3 <- peerlibrary:reactive-publish 0.5.0

@mitar mitar changed the title Error on Meteor Update 1.6.1 Error on Meteor Update 1.6.1 when using practicalmeteor:mocha May 5, 2018
@mitar
Copy link
Member

mitar commented May 5, 2018

So not sure how to fix this. It is really a problem of practicalmeteor:mocha for not being updated to 1.6.1.

@knirirr
Copy link

knirirr commented May 5, 2018

Thanks for your further comments.
I've removed practicalmeteor:mocha and replaced it with meteortesting:mocha. Unfortunately, this issue persists.

Edit: The list of packages I'm using is at https://bitbucket.org/knirirr/beecount3/src/4652c46442fee9443c69be0722c485babd19c0ba/.meteor/packages?at=master&fileviewer=file-view-default

@mitar
Copy link
Member

mitar commented May 5, 2018

You have now update all packages with meteor update --all-packages.

@mitar
Copy link
Member

mitar commented May 5, 2018

I still see practicalmeteor:mocha in your list of packages.

@knirirr
Copy link

knirirr commented May 5, 2018

I've not checked in the changes I made locally, and don't plan to do so until I can get the application working again, so it still shows the old package. In addition to the package removal/addition previously mentioned I've also run meteor update --all-packages, and the problem persists. This procedure should therefore reproduce the problem.

  1. Clone https://bitbucket.org/knirirr/beecount3.git
  2. meteor remove practicalmeteor:mocha
  3. meteor add meteortesting:mocha
  4. meteor update --all-packages
  5. meteor

@mitar
Copy link
Member

mitar commented May 6, 2018

Yea, you have other dependencies on old CoffeeScript. You should really complain to Meteor about all this situation. They managed to break many libraries using CoffeeScript and many of them are not maintained really anymore.

So try:

1. Clone https://bitbucket.org/knirirr/beecount3.git
2. meteor update
3. meteor update --all-packages
4. meteor add coffeescript@2.2.1_1

And you will see all conflicts.

* coffeescript@1.0.4 <- zimme:active-route 2.3.2
* coffeescript@1.0.4 <- softwarerero:accounts-t9n 1.3.11 <- useraccounts:core 1.14.2 <- useraccounts:flow-routing 1.14.2
* coffeescript@1.0.15 <- practicalmeteor:mocha 2.4.5_6
* coffeescript@1.0.3 <- practicalmeteor:loglevel 1.2.0_2 <- practicalmeteor:mocha 2.4.5_6
* coffeescript@1.0.3 <- practicalmeteor:chai 2.1.0_1 <- practicalmeteor:loglevel 1.2.0_2 <- practicalmeteor:mocha 2.4.5_6
* coffeescript@1.0.3 <- practicalmeteor:chai 2.1.0_1 <- practicalmeteor:mocha 2.4.5_6
* coffeescript@1.0.3 <- practicalmeteor:sinon 1.14.1_2

So besides practicalmeteor:mocha you have some other as well.

So there is not really much one can do here. Meteor broke that old already published packages do not work by forcing downgrade to broken versions. While new fixed packages require also other packages to be upgraded. And many are not maintained anymore.

@knirirr
Copy link

knirirr commented May 6, 2018

Thanks for looking into it - I'll see about pursing the issue elsewhere in case I get any luck.
The testing packages I could probably dispense with (I need to re-work all my tests anyway) but the accounts stuff is essential.

@mitar
Copy link
Member

mitar commented May 6, 2018

Accounts package moved to NPM: https://github.com/softwarerero/meteor-accounts-t9n#version-230

@mitar
Copy link
Member

mitar commented Sep 9, 2018

I am using this in my own apps with Meteor 1.6.1 and meteortesting:mocha and I do not see any issues. So closing this now.

@mitar mitar closed this as completed Sep 9, 2018
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

6 participants