commerce icon indicating copy to clipboard operation
commerce copied to clipboard

SyntaxError: Unexpected token '?' from < iOS 14

Open leeuwisarvin opened this issue 2 years ago • 4 comments

I was doing some testing on a iOS 13 device (Safari) and it threw some errors. The one who causes this was this line:

SyntaxError: Unexpected token '?'

It appears in the usePrice function and throughout other functions. Also, it does appear when testing the demo site on that same device. Does anyone know how to fix this?

leeuwisarvin avatar May 11 '22 10:05 leeuwisarvin

me too....

shixin-guo avatar May 29 '22 08:05 shixin-guo

Safari Version 12.1.2 (14607.3.9) https://nextjs.org/docs/basic-features/supported-browsers-features

image image

shixin-guo avatar May 29 '22 08:05 shixin-guo

image default option value is the root cause

EchoZhaoH avatar Aug 07 '22 07:08 EchoZhaoH

need to change the target to a lower es version in the tsconfig file and set the server option to false image image

EchoZhaoH avatar Aug 07 '22 07:08 EchoZhaoH

Hey there! Thank you for your contribution. We have decided to take Next.js Commerce in a new direction and will be closing out current PRs and issues due to this change. Please see this PR for more details: https://github.com/vercel/commerce/pull/966

leerob avatar Apr 18 '23 02:04 leerob