Questions tagged [unexpected-token]

213 questions
2
votes
1 answer

Angular declare var x:any; unexpected token 'var'

I have a problem, I am building an angular application and created a TS File that works with my API (imported in the index.html with a script tag). I am exporting functions out of this file to use them in my components. Everything is working but I…
2
votes
1 answer

reCaptcha v2 "I'm not a Robot" suddenly broken, not getting 'g-recaptcha-response'

Recaptcha v2 has been running on my site for several years. Suddenly on Friday, November 6th I no longer received 'g-recaptcha-response' and began to see the following error: recaptcha__en.js:24 Uncaught (in promise) SyntaxError: Unexpected token m…
Msark
  • 51
  • 5
2
votes
1 answer

How to use java library from kotlin program?

I am programming in Kotlin. I need to use a library, which is written in java and comes from maven central. I put the dependency in my pom.xml and can import the library in my Kotlin code. However, I am not able to understand how I can use that java…
Itération 122442
  • 2,644
  • 2
  • 27
  • 73
2
votes
1 answer

Babel-loader: unexpected token

I have inherited react a project that i'm am unable to init. The problem I had at first ( running yarn dev) was: let vdom = ; After reading this accepted anwer: babel-loader jsx SyntaxError: Unexpected token I changed in…
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378
2
votes
1 answer

ReactJS randomly Unexpected token '<'

Project was created with create-react-app. Did not eject. There are no webpack configs. Default "react-scripts": "^3.4.0". On dev version there is no error. But on production when user stays long on one page and clicks the link it shows white page,…
aturan23
  • 4,798
  • 4
  • 28
  • 52
2
votes
1 answer

Unexpected sign error when creating a list

I am trying to create a color list for specific levels of two factors. The parameters are the following: > df.coldata Condition Tank R235 Control T6 R236 LowExposure T6 R239 HighExposure T6 R241 Control T8 R242 …
han5000
  • 99
  • 7
2
votes
3 answers

Unexpected token ; when defining Boolean variable

I am setting up a TF2 trading bot that can price check. I get an error when defining a boolean for if it is priced in keys or not. I have tried just replacing isKeys with…
row666
  • 47
  • 5
2
votes
2 answers

Angular: SyntaxError: Unexpected token {

My import don work correctly. I am a novice in angular. My program is easy. I have 2 files: customer.ts class Person { constructor(protected name: string, private age: number) {} welcome(): string { return `Witaj ${this.name}, czy masz…
2
votes
1 answer

syntax error near unexpected token `(' with GNU shell function

I wanted to determine the version of the Intel Fortran compiler in my makefile, so I added some script using GNU shell function as below for testing, VERIFORT := $(shell ifort --version) #VERIFORT := $(shell ifort --version | grep ^ifort) # error…
Rubin
  • 332
  • 1
  • 10
2
votes
2 answers

"typescript unexpected token import" on GDAX-tt - tried to follow other fixes for other software to no avail

Obviously, if you search "typescript unexpected token import" you get zillions of results. They are all about some specific problem, not about how to tackle the problem in general. So, I am having problem learning from other answers to fix my…
user40176
  • 319
  • 2
  • 10
2
votes
1 answer

Uncaught SyntaxError: Unexpected token ) on line 5

var array = [1, 2, 3, 4, 5, 6]; //print the reverse of an array function printReverse(array){ for(i = array.length - 1, i >= 0, i--){ console.log(array[i]) } } printReverse(array); The code above is supposed to take an array and…
Seth Harlaar
  • 124
  • 2
  • 2
  • 13
1
vote
0 answers

Jest encountered an unexpected token when writing a test with @aws-sdk

I am trying to write a test for a function with @aws-sdk and Node.js. However, I came across this error. ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its…
Aaron Zhao
  • 11
  • 2
1
vote
0 answers

NextJS saying that there is a syntax error when using build

I am attempting to use NextJS and I am run the command npm run build but it says next command cant be found. I re-install next globally this time (npm i -g next) and the net command is found but is then throwing an error saying "unexpected token…
1
vote
1 answer

Importing a GLSL file throws an error - Vite project

So Im currently playing around with three.js and have used vite to setup the document. I've created a separate fragment.glsl so I dont have to write code inside the shadermaterial. But in the console i get the following error: Uncaught SyntaxError:…
Lauenborg
  • 11
  • 2
1
vote
0 answers

You may need an additional loader to handle the result of these loaders ECMAScript 2020

I am using svelte@3.50.1 and I have a component library that I run locally with Storybook. Since I added a new library that uses optional chaining (?.) the code would not build and I am getting the following error: ERROR in…
Alexander Donets
  • 617
  • 1
  • 5
  • 13
1
2
3
14 15