After upgrading my Extension Developer Tools to th...
# suitecommerce
c
After upgrading my Extension Developer Tools to the TBA-patched codebase, I receive this
TypeError: javascript_task.compileJavascript is not a function
error whenever I save a JavaScript file while running the local server (i.e. I can't test new JavaScript changes locally while the server is running). Any further attempts to save a JS file does not trigger the watcher to recompile. Does anyone know how to resolve?
f
Which version of SC/SCA & SCEM are you using?
c
@Flo SCEM 2020.2.1 (for SCA 2020.1)
m
Does
./skinbetter-extensions/gulp/extension-mechanism/local-tasks/javascript.js
exist with the
compileJavascript
method defined? Seems like one of those things may be missing
c
@Mark Yes it exists—that's the funny thing:
m
Might be the version of gulp or node that you are using. Are you using the SCA recommended version for both those tools?
m
Hi @Caleb Evans did you resolve the issue ? We had the same issue and was related with some third parties that didn't have the proper define
c
@Martin No we haven't resolved it yet, but that is a good suggestion
m
Is very common that 3rd parties have the following to define de module
Copy code
if (typeof define === 'function' && define.amd)
{
    // AMD. Register module.
    define('PapaParse', [], factory);
}
else if (typeof module === 'object' && module.exports)
{
    // Node. Does not work with strict CommonJS, but
    // only CommonJS-like environments that support module.exports,
    // like Node.
    module.exports = factory();
}
else
{
    // Browser globals (root is window)
    root.Papa = factory();
}
you should comment that lines and only leave the define
👍 1
so the start of th module will should look like this
Copy code
(function(root, factory)
{
    //Leave only define to avoid issues with local tools
    define('PapaParse', [], factory);
    /*
    if (typeof define === 'function' && define.amd)
    {
        // AMD. Register module.
        define('PapaParse', [], factory);
    }
    else if (typeof module === 'object' && module.exports)
    {
        // Node. Does not work with strict CommonJS, but
        // only CommonJS-like environments that support module.exports,
        // like Node.
        module.exports = factory();
    }
    else
    {
        // Browser globals (root is window)
        root.Papa = factory();
    }*/
}
Previous tools didn't have that issue