UPDATE:
The error I reported below was in my js code. Not sure where, but doesn't appear to be an "XS issue".
For others looking at this thread, below is a more detailed example for your reference.
/////////////////////////////////////////////
STRUCTURE:
-Content
--MyPackage
---MyApp.xsjs
---MyLib.xsjslib
//////////////////////////////////////////////
MyApp.xsjs code:
$.import("MyPackage","MyLib");
var x = $.MyPackage.MyLib.MyObject.MyFunction("my test string");
$.response.setBody(x);
///////////////////////////////////////////////
MyLib.xsjslib code:
var MyObject:{
MyFunction: function (myString) {
return = "You passed in the string: " + myString;
}
};
ORIGINAL:
I'm getting the following error:
Found the following errors:
===========================
TypeError: "xml2json" is read-only (line 146 position 0 in /sales/xml2json.xsjslib)
here is my import code:
$.import("sales","xml2json");
xsjslib and xsjs are in the same package, sales, as shown below.
Content
-Sales
--ccw.xsjs
--xml2json.xsjslib