Nour Khaled
04/17/2025, 11:40 PMCeligo AI
04/17/2025, 11:40 PMAI generated answer (using internal Slack threads):The error message
Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"missing ; before statement (SS_SCRIPT_FOR_METADATA#34)","stack":[]}
indicates that there is a syntax error in your SuiteScript code. The error message suggests that there is a semicolon (;
) missing before a statement in your script.
In the first thread, the error was encountered while trying to upload a Suitelet script. The script seems to be missing a valid entry point. In SuiteScript 2.x, every script must have an entry point. For Suitelet scripts, the entry point could be a function that is exported with the name onRequest
. Also, the @NApiVersion
tag is too ambiguous. It should be either 2.0 or 2.1.
In the second thread, the error was encountered while using webpack. The suggestion was to use babel with es5 because webpack might be transpiling the code to a JavaScript version that NetSuite does not understand.
In the third thread, the error was encountered while trying to upload a Map/Reduce script. The issue was with the module names. In SuiteScript, module names are case-sensitive and should be in lowercase. So, 'N/Search'
, 'N/Record'
should be 'N/search'
, 'N/record'
. Also, the N/log
module is always available and does not need to be included.
Please review your script and correct the syntax errors. If you are new to SuiteScript, I recommend starting with the SuiteScript 2.x API Introduction and checking out the NetSuite Help Center for more information and examples.Celigo AI
04/17/2025, 11:40 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.886367559
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.883699894
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.859412432
Celigo AI
04/17/2025, 11:40 PM