FlowRouter - Unexpected character

Hey Guys, I’m extending the user accounts with some fields and I’m doing that by following this tutorial

this is my routes code on /lib/routes.js

> FlowRouter.route(‘/’, {
>    name: ‘home’,
>    action: function() {
>    BlazeLayout.render(“mainLayout”, {
>       content: “home”
>    });
>   }
> });
> FlowRouter.route(‘/login’, {
>    name: ‘login’,
>    action: function() {
>    BlazeLayout.render(“mainLayout”, {
>       content: “login”
>    });
>   }
> });
> FlowRouter.route(‘/register’, {
>    name: ‘register’,
>    action: function() {
>    BlazeLayout.render(“mainLayout”, {
>       content: “register”
>    });
>   }
> });

The error i’m getting

=> Errors prevented startup:

While processing files with ecmascript (for target web.browser):
lib/routes.js:1:17: Unexpected character ‘‘’ (1:17)

While processing files with ecmascript (for target os.windows.x86_32):
lib/routes.js:1:17: Unexpected character ‘‘’ (1:17)

Any ideas?

It looks like you’re using smart quotes instead of regular quotes. This can happen when copy/pasting or using a non code editor. Try replacing all the quotes manually with ' (notice yours loooks like and

You can also remote smart quotes in OSX:

2 Likes

thank you!!! it’s solved

1 Like