michoel
01/06/2021, 12:44 AMThere was a problem when uploading the file. Details: SuiteScript 2.1 entry point scripts must implement one script type function.. when upload I a Map/Reduce via Webstorm.
I believe I've isolated the issue to the dependencies. It imports two module libraries - utils.js and constants.js. utils.js also depends on constants.js. If I try add both to the MapReduce I get the error, but if I only add either one of the two, or remove constants.js as a dependency from utils.js it uploads fine.
Also noteworthy is I have a suitelet that is importing both libraries without issue. Additionally SDF deploy works fine, and I am only encountering the issue if I upload the file individually.stalbert
01/06/2021, 1:01 AMmichoel
01/06/2021, 1:02 AM/**
* @NApiVersion 2.1
* @NScriptType MapReduceScript
*/
define([], () => ({
getInputData() {
return ["hello world"];
},
map(context) {
log.debug(context.value);
},
}));creece
01/06/2021, 2:54 AMcreece
01/06/2021, 2:54 AMmichoel
01/06/2021, 4:03 AMmichoel
01/06/2021, 5:08 AMfilename.js and in the others it was just filename and this appears to throw NetSuite off. Removing the .js has resolved the issue. headbanging parrotstalbert
01/06/2021, 2:28 PM