Scenario
The user has a client script that when he tries to create a script record in NetSuite using this file, he encounters the MODULE_DOES_NOT_EXIST error.
Solution
First thing we need to check is the content of the script itself. The define function at the beginning of the script contains the modules that are loaded into the script. Users should:
1. Double check for any grammatical errors.
2. Validate if the module works for client-side scripts, server-side scripts, or both.
3. If no issues were found in the script’s content, check the file name of the script. There are times where users forget to add .js therefore the file is not recognized as a JavaScript file.
4. If the file is being uploaded directly from your local directory, check it from there.
5. If the file came from the File Cabinet, navigate to Documents > Files > SuiteScripts.
6. Look for your script file and open the file record.
7. Click Edit.
8. Under Media Item field, check if the file has .js extension. If not, download, edit, and re-upload the file in the same file record.
-----
Found this helpful? Let us know what you think by leaving a comment or a reaction below!