Meteor update to 0.8.3 breaks app - meteor

Today I updated my Meteor project to version 0.8.3
$> [master●] % mrt update
✓ normalize.css
branch: https://github.com/rithis-archive/meteor-normalize.css.git#master
✓ Meteor.cron
branch: https://github.com/alexsuslov/Meteor.cron.git#master
✓ iron-router
tag: https://github.com/EventedMind/iron-router.git#v0.9.1
✓ mongodb-server-aggregation
tag: https://github.com/zvictor/meteor-mongo-server.git#v1.0.3
✓ reactive-publish
tag: https://github.com/Diggsey/meteor-reactive-publish.git#v0.1.6
✓ reststop2
tag: https://github.com/Differential/reststop2.git#v0.6.0
✓ kadira
tag: https://github.com/meteorhacks/kadira.git#v2.4.13
✓ subs-manager
tag: https://github.com/meteorhacks/subs-manager.git#v1.0.2
✓ async
tag: https://github.com/peerlibrary/meteor-async.git#v0.9.0-1
✓ npm
tag: https://github.com/arunoda/meteor-npm.git#v0.2.6
✓ iron-layout
tag: https://github.com/EventedMind/iron-layout.git#v0.2.0
✓ server-deps
tag: https://github.com/Diggsey/meteor-server-deps.git#v0.1.2
✓ blaze-layout
tag: https://github.com/EventedMind/blaze-layout.git#v0.2.5
✓ iron-core
tag: https://github.com/EventedMind/iron-core.git#v0.2.0
✓ iron-dynamic-template
tag: https://github.com/EventedMind/iron-dynamic-template.git#v0.2.1
Done installing smart packages
Now when I run it $> mrt I get the following output:
Stand back while Meteorite does its thing
Done installing smart packages
Ok, everything's ready. Here comes Meteor!
[[[[[ ~/tmp/test ]]]]]
=> Started proxy.
=> Meteor 0.8.3 is available. Update this project with 'meteor update'.
=> Started MongoDB.
iron-router: updating npm dependencies -- connect...
kadira: updating npm dependencies -- debug, usage...
=> Errors prevented startup:
While building package `iron-router`:
error: no such package: 'reactive-dict#1.0.0'
error: no such package: 'deps#1.0.0'
error: no such package: 'underscore#1.0.0'
error: no such package: 'ejson#1.0.0'
error: no such package: 'jquery#1.0.0'
error: no such package: 'ui#1.0.0'
error: no such package: 'iron'
error: no such package: 'cmather'
error: no such package: 'webapp#1.0.0'
=> Your application has errors. Waiting for file change.
Now when I do meteor update the problem remains. Even if I first do meteor update and then mrt update I end up with the same result. Any suggestions ?

The problem is that running mrt update has updated iron:router to the latest version (0.9.1), which is only compatible with meteor 0.9 release candidates (see the explanation here : Installation issues with iron-router (newest) on Windows 7 x64 (Meteor 0.8.3)).
What you need to do is downgrading iron-router to 0.8.2 which is compatible with meteor 0.8.3.
To do so, you'll have to modify your smart.json like this :
{
"packages": {
"iron-router":{
"version": "0.8.2"
}
}
Then clean your project by removing smart.lock and run mrt install to make sure meteorite has accounted for the change.
If everything is OK the iron-router version symlinked in your project packages folder should point to iron-router#0.8.2

Related

Error while upgrading from 1.4.4.2 to 1.4.4.3 or higher

I faced below error when I ran below commands;
meteor update --patch
ran command meteor
ERROR
D:\test>meteor update --patch
Changes to your project's package version selections from updating the
release:
accounts-base upgraded from 1.2.17 to 1.3.0
babel-compiler upgraded from 6.18.2 to 6.19.1
boilerplate-generator upgraded from 1.0.11 to 1.1.0
dynamic-import added, version 0.1.0
ecmascript upgraded from 0.7.3 to 0.8.0
ecmascript-runtime upgraded from 0.3.15 to 0.4.1
ecmascript-runtime-client added, version 0.4.1
ecmascript-runtime-server added, version 0.4.1
localstorage upgraded from 1.0.12 to 1.1.0
meteor-base upgraded from 1.0.4 to 1.1.0
minifier-js upgraded from 2.0.0 to 2.1.0
minimongo upgraded from 1.0.23 to 1.2.0
modules upgraded from 0.8.2 to 0.9.0
modules-runtime upgraded from 0.7.10 to 0.8.0
mongo upgraded from 1.1.17 to 1.1.18
promise upgraded from 0.8.8 to 0.8.9
reactive-dict upgraded from 1.1.8 to 1.1.9
standard-minifier-js upgraded from 2.0.0 to 2.1.0
webapp upgraded from 1.3.15 to 1.3.16
test: updated to Meteor 1.4.4.3.
D:\test>meteor
[[[[[ ~\D\test ]]]]]
=> Started proxy.
=> Meteor 1.5 is available. Update this project with 'meteor update'.
=> Started MongoDB.
=> Errors prevented startup:
While selecting package versions:
error: Potentially incompatible change required to top-level
dependency: meteor-base 1.0.4, was 1.1.0.
Constraints on package "meteor-base":
* meteor-base#1.0.4 <- top level
* meteor-base#1.0.4 <- top level
Potentially incompatible change required to top-level dependency:
dynamic-import 0.1.0-beta.20, was 0.1.0.
Constraints on package "dynamic-import":
To allow potentially incompatible changes to top-level dependencies,
you must pass --allow-incompatible-update on the command line.
=> Your application has errors. Waiting for file change.
if you update to meteor 1.5 with meteor update Everything will work as expected with 0 conflict.
Dont touch any files!
Worked for me, first update that actually does not break anything.
I have noticed that the update included package "dynamic-import".
Just taking it out solved the issue. Then run with:
meteor --allow-incompatible-update
Maybe it is just a coincidence I have made this patch just a bit after the new Meteor 1.5 is launched. I wonder if this package should not be in this release.

Angular2-Meteor and materialize-scss

I've started playing with urigo/angular2-meteor-base, followed the official tutorial and now want to test a frontend css framework. After some googling I chose poetic:materialize-scss but I'm having some issue importing the scss file.
Installation from the official docs:
meteor add fourseven:scss
meteor add poetic:materialize-scss
Then import the scss in client/styles/main.scss:
#import "{poetic:materialize-scss}/sass/materialize.scss";
After running meteor in the project folder and I get the following error:
Errors prevented startup:
While determining active plugins:
error: conflict: two packages included in the app (fourseven:scss and angular2-compilers) are both trying to handle *.scss
error: conflict: two packages included in the app (fourseven:scss and angular2-compilers) are both trying to handle *.sass
So I've tried removing fourseven:scss and running meteor again:
Errors prevented startup:
While processing files with angular2-compilers (for target web.browser):
/client/styles/main.scss: Scss compiler error:
File to import {poetic:materialize-scss}/sass/materialize.scss not found in file:
/home/vagrant/Projects/NgMeteor/{}/client/styles/main.scss
This is a list of packages installed:
angular2-compilers 0.6.6
autopublish 1.0.7
dispatch:mocha-phantomjs 0.1.9
es5-shim 4.6.15
hwillson:stub-collections 1.0.3
insecure 1.0.7
meteor-base 1.0.4
mobile-experience 1.0.4
mongo 1.1.14
poetic:materialize-scss 1.97.6_1
practicalmeteor:mocha 2.4.5_6
reactive-var 1.0.11
shell-server 0.2.1
standard-minifier-css 1.3.2
standard-minifier-js 1.2.1
tracker 1.1.1
xolvio:cleaner 0.3.1
Not sure if I'm importing the scss file from the right location... does anyone having the same issue?
I am not sure how to include a meteor package scss but I do know how to include a npm package so as a solution you could just install it via npm npm install materialize-css and then include it. Seems to be located here https://github.com/Dogfalo/materialize/blob/master/sass/materialize.scss so you should be able to do
#import "{}/node_modules/materialize/sass/materialize.scss";
Also, do you know about https://github.com/angular/material2 ? I'd recommend using that instead.

package alanning:roles at 1.0.6 is incompatible with Meteor 0.9.0 or later

My meteor version is 1.4.1.1 and have used my personalised package in which I am using alanning:roles (api.use(alanning:roles))
I am getting the following errors on my command prompt:
W20161111-16:24:34.950(5.5)? (STDERR) The package mizzao:user-status at 0.2.0 is incompatible with Meteor 0.9.0 or later.
W20161111-16:24:35.473(5.5)? (STDERR) If a new, compatible version of this package exists, running 'meteor update' should cause you to update.
W20161111-16:24:35.474(5.5)? (STDERR) The package alanning:roles at 1.0.6 is incompatible with Meteor 0.9.0 or later.
W20161111-16:24:35.474(5.5)? (STDERR) If a new, compatible version of this package exists, running 'meteor update' should cause you to update.
=> Started your app.
What am I doing wrong?
Got the answer simply write below command in your meteor project command prompt:
meteor update alanning:roles

Cannot remove email using Accounts Package in Meteor

When trying to use one of the basic Accounts methods listed below on the server-side, I always get an error of the following type:
TypeError: Object # has no method 'removeEmail'
Server Methods:
Accounts.addEmail()
Accounts.removeEmail()
Accounts.findUserByUsername()
Accounts.findUserByEmail()
I have tried from inside the app and from the REPL shell.
Accounts-related packages I use:
meteor-platform
accounts-password
accounts-facebook
pauli:accounts-linkedin
accounts-twitter
splendido:accounts-emails-field
accounts-base
alanning:roles
You are probably running a Meteor version prior to Meteor 1.2. I think all of the functions you mention were added in 1.2. To check your meteor version, run:
meteor --version
If that isn't the problem, please provide the exact code that is causing the error you mentioned.
FYI, the following shows that those methods exist in my Meteor 1.2 installation with the packages you mentioned:
[brettle#localhost test-app]$ meteor --version
Meteor 1.2.0.2
[brettle#localhost tmp]$ 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/learn
[brettle#localhost tmp]$ cd test-app
#### Note "meteor add accounts-password" also works instead of this next line:
[brettle#localhost test-app]$ meteor add accounts-password accounts-facebook pauli:accounts-linkedin accounts-twitter splendido:accounts-emails-field accounts-base alanning:roles
Changes to your project's package version selections:
accounts-base added, version 1.2.1
accounts-facebook added, version 1.0.6
accounts-oauth added, version 1.1.7
accounts-password added, version 1.1.3
accounts-twitter added, version 1.0.6
alanning:roles added, version 1.2.14
ddp-rate-limiter added, version 1.0.0
email added, version 1.0.7
facebook added, version 1.2.2
localstorage added, version 1.0.5
npm-bcrypt added, version 0.7.8_2
oauth added, version 1.1.6
oauth1 added, version 1.1.5
oauth2 added, version 1.1.5
pauli:accounts-linkedin added, version 1.1.2
pauli:linkedin added, version 1.1.2
rate-limit added, version 1.0.0
service-configuration added, version 1.0.5
sha added, version 1.0.4
splendido:accounts-emails-field added, version 1.2.0
srp added, version 1.0.4
twitter added, version 1.1.5
accounts-password: Password support for accounts
accounts-facebook: Login service for Facebook accounts
pauli:accounts-linkedin: Accounts service for LinkedIn accounts
accounts-twitter: Login service for Twitter accounts
splendido:accounts-emails-field: Adds to the user obj a `registered_emails`
field containing 3rd-party account service emails.
accounts-base: A user account system
alanning:roles: Authorization package for Meteor
[brettle#localhost test-app]$ meteor &
[1] 21185
[[[[[ ~/tmp/test-app ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
I20151007-23:49:34.554(-7)? ** You've set up some data subscriptions with Meteor.publish(), but
I20151007-23:49:34.555(-7)? ** you still have autopublish turned on. Because autopublish is still
I20151007-23:49:34.555(-7)? ** on, your Meteor.publish() calls won't have much effect. All data
I20151007-23:49:34.555(-7)? ** will still be sent to all clients.
I20151007-23:49:34.555(-7)? **
I20151007-23:49:34.556(-7)? ** Turn off autopublish by removing the autopublish package:
I20151007-23:49:34.556(-7)? **
I20151007-23:49:34.556(-7)? ** $ meteor remove autopublish
I20151007-23:49:34.556(-7)? **
I20151007-23:49:34.556(-7)? ** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
I20151007-23:49:34.556(-7)? ** for each collection that you want clients to see.
I20151007-23:49:34.556(-7)?
[brettle#localhost test-app]$ meteor shell
Welcome to the server-side interactive shell!
Tab completion is enabled for global variables.
Type .reload to restart the server and the shell.
Type .exit to disconnect from the server and leave the shell.
Type .help for additional help.
> Accounts.removeEmail
[Function]
> Accounts.addEmail
[Function]
> Accounts.findUserByUsername
[Function]
> Accounts.findUserByEmail
[Function]

Why the Meteor package ian:accounts-ui-bootstrap-3 is behaving differently if is installed as a dependency?

I'm trying to create a Meteor package, which has, as a dependency the package ian:accounts-ui-bootstrap-3. I added the dependency in my package.js like this:
Package.onUse(function(api) {
api.versionsFrom('1.1.0.2');
api.use(['ian:accounts-ui-bootstrap-3'], 'client');
api.addFiles('package-name.js');
});
After I add my package in the console, the following packages are added to the project:
accounts-base added, version 1.2.0
me:my-package-name added, version 0.0.1
handlebars added, version 1.0.3
ian:accounts-ui-bootstrap-3 added, version 1.0.7
localstorage added, version 1.0.3
service-configuration added, version 1.0.4
stylus added, version 1.0.7
The issue is that the accounts system is not working. In the browser I get this error:
Uncaught TypeError: Cannot read property 'push' of undefined
'push' being the property of
Template.__body__.__contentParts
If I add the ian:accounts-ui-bootstrap-3 manually it works fine, I don't get the error. But when I do that, the packages which are installed on the project are a little different:
accounts-base added, version 1.2.0
anti:i18n added, version 0.4.3
ian:accounts-ui-bootstrap-3 added, version 1.2.59
localstorage added, version 1.0.3
service-configuration added, version 1.0.4
stylus added, version 1.0.7
As you can see I don't have handlebars anymore but instead anti:i18n. I tried to install the anti:i18n as a dependency in my package but I got the same browser error.
Can anyone say, what I'm doing wrong and why the package behaves like that when is installed differently (manual vs dependency).
To give you this example I just created an empty package, with only this dependency, so nothing else can affect the number of packages being installed.
Try using 'imply' instead of 'use'. This exposes the package to the global scope. Without much more in details of your problem this is probably most likely to solve the issue (I hope):
api.imply(['ian:accounts-ui-bootstrap-3']);
Instead of
api.use(['ian:accounts-ui-bootstrap-3'], 'client');
I found the issue. When installed as a dependency the package: ian:accounts-ui-bootstrap-3 will install version 1.0.7 which is an old one.
When it is installed manually, it installs version 1.2.59 and this one has the features I want.
So to solve the issue I just specified the needed version in the dependency using '#'.
I think this have to be changed, like when you install a package via a dependency, it should install the latest version and an older one only if is specified by #.

Resources