I'm getting the error `There was a problem when up...
# sdf
e
I'm getting the error
There was a problem when uploading the file. Details: Failed to validate script file: This file is used by a SuiteScript 2.0 script; you cannot change the API version of the file.
even though I didn't change the
@NApiVersion
from 2.0. (Not 2.x.) I can edit the script in the UI but not upload. Any ideas?
Rookie mistake; JSDoc comment was after the define
👀 1
e
Hm in the past I generally put my JSDocs inside the define like
Copy code
define([...], (...) {
  /**
    * @NApiVersion 2.1
    * ...
    */
  const exports = {};
and never saw this issue
I don't use the
exports
variable anymore so I've moved the docs outside, but I didn't have issues with it either way ¯\_(ツ)_/¯
e
I added comments for record, search, etc, for the callback, that was part of it. Never had an issue before
My webstorm requires me to specify a type for each callback param for autocomplete to work for some reason. Just started happening.
p
you gotta use snippets for that 😉 in vscode i type ‘define’ and then i get a suggestion on which suitescript type