13

line 1, col 0, This character may get silently deleted by one or more browsers. I get this error 4 times, for every .js file I've added.

For instance

error text:

'scripts/models/company.js: line 1, col 0, This character may get silently deleted by one or more browsers '

scripts/models/company.js content:

import DS from "ember-data";

export default DS.Model.extend({
name: DS.attr('string'),
address: DS.attr('string')
});
Nininea
  • 2,671
  • 6
  • 31
  • 57
  • What version of JSHint are you using? That message is no longer given in the more recent versions. The fact that it's being given at that position means it's likely you have some non-printable character before the first actual character in your file. – James Allardice Jul 07 '14 at 08:11
  • @JamesAllardice, I use ember-cli (v 0.0.33) and it uses broccoli-jshint v 0.5.0 (v 2.5.1 - jshint). – Nininea Jul 07 '14 at 09:04
  • I've updated it to the last version (V 2.5.1), but still get the same errors – Nininea Jul 07 '14 at 09:10
  • Not sure if this is related but 'int' is not one of the Ember Data datatypes. The built in data types are string, number, boolean and date. – HeroicEric Jul 21 '14 at 21:47
  • I removed this type, but error still occurs – Nininea Jul 21 '14 at 21:51

1 Answers1

12

This character is the UTF-8 BOM (Byte Order Mark), nothing to worry about. Just open the file in Notepad++ or another editor and change the encoding from 'UTF-8' to 'UTF-8 without BOM'.

Roman Ganz
  • 1,615
  • 1
  • 20
  • 27