From: Colin <col...@gm...> - 2024-05-07 02:05:00
|
Glad it works now. :) these are the 'considerations' for the functions in the .conf format https://jbrowse.org/docs/configuration_file_formats.html#callback-function-specific-considerations-for-the-text-based-conf-format- I also found that jbrowse can be made to create source maps for production builds using this change to webpack.config.js diff --git a/webpack.config.js b/webpack.config.js index 6d1bfa685..0dd90ce97 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,6 +19,7 @@ var webpackConf = { main: "src/JBrowse/main", browser: "src/JBrowse/standalone" }, + devtool:'source-map', plugins: [ new CleanWebpackPlugin(['dist']), This will generate new ".map" files in the "dist" directory when you run setup.sh or the build, and these will improve the error messages in e.g. chrome devtools or the javascript console -Colin On Mon, May 6, 2024 at 3:31 PM Vaneet Lotay <van...@uc...> wrote: > For some reason it works now. Maybe it was a hidden character that went > away once I recopied from another source. > > > > I’m pretty sure I do have a dev-build of jbrowse since I’ve added plugins > and done some minor modifications to the source js files. How do I make > sure I get more informative error messages? That would be great. > > > > Thanks, > > > > Vaneet > > > > *From:* Colin <col...@gm...> > *Sent:* Friday, May 3, 2024 8:08 AM > *To:* Vaneet Lotay <van...@uc...> > *Cc:* gmo...@li... > *Subject:* Re: [Gmod-ajax] JBrowse fmtDetailValue error > > > > [△EXTERNAL] > > > > You'll likely get this error if there is a problem such as a syntax error > with your function in functions.conf > > > > You didn't attach your functions.conf so hard to know but this is the > likely case > > > > Also note that you can get better error messages if you use a "dev" build > of jbrowse, this will have regular function names and actual line numbers > instead of mangled names and minified single line compressed bundles > > > > > > -Colin > > > > On Fri, May 3, 2024 at 3:47 AM Vaneet Lotay <van...@uc...> > wrote: > > Hello, > > > > I’m getting a strange error when trying to reference a callback function > to replace my dbxref field, something I’ve done many times for every other > genome using the same code and syntax without fail using this line: > > > > "fmtDetailValue_Dbxref" : "{dbxLinks}", > > > > I also have the include statement referencing which file contains my > functions added into this genome’s trackList.json file: > > > > "include" : "functions.conf", > > > > Here’s the error I get when trying to click on a gene model to view its > details: > > > > Uncaught TypeError: u is not a function > > at Object.renderDetailValue (1.bundle.js:1:555217) > > at Object.renderDetailField (1.bundle.js:1:554833) > > at 1.bundle.js:1:388369 > > at Array.forEach (<anonymous>) > > at Object._renderAdditionalTagsDetail (1.bundle.js:1:388346) > > at Object.defaultFeatureDetail (1.bundle.js:1:386667) > > at Object.<anonymous> (0.bundle.js:1:20292) > > at Object._evalConf (1.bundle.js:1:285747) > > at Object._openDialog (1.bundle.js:1:286530) > > at Object.n (1.bundle.js:1:283338) > > > > I’m not sure which ‘u’ it’s referring to, I’m just hoping one of you has > seen this error before. The strange part is if I remove the ‘include’ > statement, the error remains. If I change the ‘dbxLinks’ to anything else > or any random set of letters, it still fails with the same error. If I set > it to an empty string between the double quotes it at least allows me to > open the gene model details but obviously doesn’t change the dbxref field. > If I manually write a function in there instead of referencing a function > in an external file, it seems to work. I don’t understand why this time it > has a problem with me referencing a callback function when I’ve used the > same function and code so many times with no issue. > > > > Thanks > > > > Vaneet > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > > |