Migrating to Meteor 1.3


#1

This is the comment thread for the Migrating to Meteor 1.3 article in the Meteor Guide.

Read the article: http://guide.meteor.com/1.3-migration.html

The comment thread for each article appears at the very bottom of the page. Use this thread to post:

  • Interesting articles related to the content
  • New ways to do things that aren’t covered in the Guide
  • Suggestions for Guide improvements

Or anything else related to this topic that people could find useful!


Installing Meteor 1.3 with an existing 1.2 left in place
#2

I just ran meteor update and was prompted that I’m now on 1.3
I looked at my versions file, and meteor is at 1.1.2
If I run meteor update again it tells me I’m currently at 1.3
I’m trying to use import for an npm package, and I get this error:
W20160331-11:02:58.473(-6)? (STDERR) import barcode from “bwip-js”;
W20160331-11:02:58.474(-6)? (STDERR) ^^^^^^
W20160331-11:02:58.477(-6)? (STDERR) SyntaxError: Unexpected reserved word


#3

try doing meteor add modules to enable the new module system.


#4

and meteor add ecmascript for import statements :slight_smile:


#5

Has anyone had issues with FlowRouter since upgrading?

I’m getting this error client side:

There is no route for the path: /


#6

Still no joy. require works though.


#7

I got into a similar situation trying to upgrade from 1.1 . In the end, I created a new meteor project and copied everything except my .meteor directory over and that fixed the problem.


#8

That is my exact issue, I made another post about it on here as well, no responses yet!


#9

I spent an evening thinking my imports weren’t working. I would set a breakpoint in chrome dev tools and check if the objects I needed had become available. They weren’t, but that’s because I didn’t have any code in that scope using those objects, and Meteor doesn’t load the stuff you aren’t using. I didn’t expect that, though. Hopefully this saves someone else the same headache.


#10

Actually… some of my imports just don’t seem to work… still trying to understand why.


#11

If require works, it could be that your import statements are not the first non-code elements of your file. import needs to be in the top only.


#12

The meteor package in .meteor/versions is different to the Meteor release in .meteor/release. That’s the file to check.


#13

A comparison of meteor list on the old app and meteor list on a newly created app
for 1.3 will show the missing components.

Without adding the components listed from the newly created app you cannot
use the “import” keyword

A simple but critical step for upgrading to 1.3 when npm is needed.


#14

@wesleyfsmith that may mean that your application is not loading correctly. It has nothing to do with FlowRouter i think but rather something wrong with your application. May be you are missing some modules etc.


#15

Yes I am seeing the same thing. Are you by any chance using useraccounts:… packages? Because I see the error on the FlowRouter initialization made by useraccounts:flow-router. Although that might be just because it is the first FlowRouter calls to happen in the app…


FlowRouter Errors w/ 1.3 upgrade
#16

@alonflowhub:

I’m trying to use import for an npm package, and I get this error:
W20160331-11:02:58.473(-6)? (STDERR) import barcode from “bwip-js”;

Sorry, I glossed over this too quickly. Npm packages aren’t processed by Meteor build plugins. It’s up to the npm package author to decide on which targets he builds for. It’s quite common today to find packages that automatically convert everything to ES5 (“old” javascript) before publishing, via babel (just like what Meteor does).

Also important to note that for server side npm packages, authors don’t usually bother to transpile with babel, because a lot of the ES6 features are already in node. Unfortunately Meteor 1.3 still uses quite an old version of node without these features, but the goods news is that this has been earmarked as a priority for the next few releases.

For now, as you noticed, it’s possible to change the imports by hand. You could also “convert” the module using babel; you can google how to do that if you want… but no need to worry with that if you already have it working.


#17

I’ve had exactly the same issue with IronRouter - as in the same equivalent message. Never had to change my code for any meteor releases before, 1.3 is the first update that has broken my app


#18

I am using the useraccounts package. As well I am using the alethes Pages package… Does anyone else encountering this issue happen to be using that package too?

(Edit: @wesleyfsmith confirmed that he is using the Pages + Flow packages, and removing Pages package fixed the problem!

It looks like Pages is in need of a fix! There’s some forks out there but I have not tried them to see if they fix the issue!)


#19

Are there any nice Meteor 1.3 open source project except the todos?

I am currently refactoring an app to 1.3 and it would be nice to see more examples :slight_smile:


#20

Here’s one!