0

Uncaught SyntaxError: Unexpected token ILLEGAL

Invalid character is coming in the generated *-js-deps.js, when I am trying to add a ProvidedJS build.sbt

I tried with 0.6.9 & 0.6.11 addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.11")

jsDependencies += ProvidedJS / "js/igniteui/infragistics.core.js"

Any clue why it is adding an invalid character in the generated *-js-deps.js ?

Thanks in advance

PS - I have used the normalized path as per this gissue https://github.com/scala-js/scala-js/issues/2358

Justin Patel
  • 1,323
  • 10
  • 5
  • That seems to be a byte order mark (aka BOM) that is in the included file (`infragistics.core.js`). Hence, it seems like your file is UTF-16 encoded. Scala.js assumes files to be UTF-8 encoded. Try changing the file to UTF-8 encoding and see if the problem persists. If you absolutely need UTF-16 support, please file an issue. – gzm0 Aug 01 '16 at 10:01
  • $ file -bi infragistics.core.js **application/octet-stream; charset=binary** – Justin Patel Aug 01 '16 at 12:59
  • seems it has some binary data in .js file, tried dos2unix but no luck, trying to encode the file to UTF-8 or ASCII – Justin Patel Aug 01 '16 at 13:09

0 Answers0