Not a coder but found a great tutorial on bringing in outside API references for a search function on the online store. Created an API page from google sheets and connected thru java on wix from you tube tutorial. However getting a Parsing Error: Unexpected Token ;
I’m sure it’s something simple, but can’t figure out. Any help would be amazing!
Please make responses simplistic as again I am not a coder and this will be my only use for code.
Here is my front end (where parsing error exists):
import {getTheIdeaPointsTracker} from ‘backend/servicemodule’ ;
$w.onReady( function () {
});
export function CheckPointsButton_click(event, $w) {
getTheIdeaPointsTracker($w( “#EmployeeIDInput” ).value
.then(EmployeeIDInput => {
$w( “#PointsAvailableResults” ).text =
+ "ID: " + EmployeeIDInput[ 0 ].employeeidinput + “\n”
+ "Employee Name: " + EmployeeIDInput[ 0 ].employeename + “\n”
+ "Current Points: " + EmployeeIDInput[ 0 ].currentpoints + “\n” ;
});
}
back end jsw:
import {fetch} from ‘wix-fetch’ ;
export function getTheIdeaPointsTracker(currentpoints) {
const url = 'https://spr eadsheets.google.com/feeds/list/18Tx1KJJK9jAweYFQMJj4NRwJZKx0yU6M0j_jsPFOhyw/od6/public/values/cokwr?alt=json’ + ‘employeeidinput’ + ‘/’ ;
console.log( "Url: " + url);
return fetch(url, {method: ‘get’ })
.then(response => response.json())
}
Hi sherri,
Can you take a screenshot of your error
Oke i think i se the fault.
When you call getTheIdeaPointsTracker you need an ) behinde $w("#EmployeeIDInput.value
Errors with unexpected ;} or ) mostlikly means you forgot it somewhere.
Kind regards,
Kristof.
If you got this from a tutorial, you should carefully go over the tutorial to make sure you did everything precisely as described.
It looks as if the following line is missing the closing parenthesis in your code:
getTheIdeaPointsTracker($w("#EmployeeIDInput").value)
@volkaertskristof Thank you so much! It removed the error, now I have to figure out why it’s not showing the results on page.
Am getting this error now 
Cannot find module ‘backend/servicemodule’ in ‘public/pages/pmkr9.js’
Try adding the extention to it.
Backend/servicemodule.jsw
.js doesn’t need to be defines but .jsw in the backend does need to be defined 
@volkaertskristof Thank you it appears it was lower case versus upper case - it needed to be exact. Now another error.
Url: https:// spreadsheets.google. com/feeds/list/18Tx1KJJK9jAweYFQMJj4NRwJZKx0yU6M0j_jsPFOhyw/od6/public/values/cokwr?alt=jsonemployeeidinput/
ServiceModule.jsw
Line 5
invalid json response body at https:// spreadsheets.google. com/feeds/list/18Tx1KJJK9jAweYFQMJj4NRwJZKx0yU6M0j_jsPFOhyw/od6/public/values/cokwr?alt=jsonemployeeidinput/ reason: Unexpected token U in JSON at position 0
invalid json response body at https:// spreadsheets.google. com/feeds/list/18Tx1KJJK9jAweYFQMJj4NRwJZKx0yU6M0j_jsPFOhyw/od6/public/values/cokwr?alt=jsonemployeeidinput/ reason: Unexpected token U in JSON at position 0
Hi Sherri,
I never worked with json files or google spreadsheets.my suggestion is that you make a new question with a new title.
This way people that are more used using json can take a look at it.
Kind regards,
Kristof.
@volkaertskristof Thank you so much for all of your help!