Error Message: Unexpected character '�'

Hi,

I started receiving the following error message on 3 apps that all previously worked:

Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

While computing assigned variables:
/packages/spacebars-compiler/templatetag.js: Unexpected character ‘�’
(377:41)

=> Your application has errors. Waiting for file change.

I’m not 100% sure, but I think the last action I took before the error message started showing up was running the following package install:

meteor remove mrt:iron-router-progress

Again, not 100% sure, but I think that’s when the error started. I tried toying around with a few steps like removing that package, or looking into /packages/spacebars-compiler/templatetag.js. Not having any success though.

Highly appreciate any advice on what to do next.

I would say you saved one of your files as UTF8 with BOM. Find that file, save it as UTF8 without BOM, and your problem should go away. This in a guess based on experience.

1 Like

That worked. Very strange that saving one file caused all the meteor projects to throw for that error. But oh well, your solution works.

It is not strange really. Those BOM characters would cause you headache if it were a PHP, Python or Rails project, too.

And it is not my solution per se. It is the solution. I have seen this error many times with people using Windows. I would wager you are using Windows, too.

Anyways; glad I could help.