Skip to content

Commit fc33ba0

Browse files
committed
More debugging efforts
1 parent 5206a0a commit fc33ba0

File tree

3 files changed

+47
-29
lines changed

3 files changed

+47
-29
lines changed

jbrowse/package-lock.json

Lines changed: 30 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jbrowse/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build-prod": "npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map webpack --config ./config/prod.config.js --progress --profile",
1212
"clean": "rimraf resources/web/gen && rimraf resources/web/jbrowse/gen && rimraf resources/views/gen",
1313
"prepareCli": "rimraf ./buildCli && rimraf ./resources/external/jb-cli && npm install @jbrowse/cli@1.7.4 --prefix ./buildCli",
14-
"jb-pkg": "npm run prepareCli && npx pkg --outdir=./resources/external/jb-cli ./buildCli/node_modules/@jbrowse/cli && rimraf ./buildCli"
14+
"jb-pkg": "npm run prepareCli && npx pkg --debug --outdir=./resources/external/jb-cli ./buildCli/node_modules/@jbrowse/cli && rimraf ./buildCli"
1515
},
1616
"dependencies": {
1717
"@gmod/vcf": "^6.0.9",
@@ -24,7 +24,7 @@
2424
"@labkey/api": "^1.39.0",
2525
"@labkey/components": "^6.32.2",
2626
"@mui/x-data-grid": "^7.28.1",
27-
"@yao-pkg/pkg": "^6.3.2",
27+
"@yao-pkg/pkg": "^6.6.0",
2828
"assert": "^2.1.0",
2929
"browserify-zlib": "^0.2.0",
3030
"buffer": "^6.0.3",

jbrowse/src/org/labkey/jbrowse/JBrowseManager.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -243,33 +243,34 @@ public void testJBrowseCli() throws Exception
243243
wrapper.setLogPath(true);
244244
wrapper.setThrowNonZeroExits(false);
245245

246+
File node = AbstractCommandWrapper.resolveFileInPath("node", null, false);
247+
if (node == null)
248+
{
249+
_log.info("Unable to find node in PATH, trying node.exe");
250+
node = AbstractCommandWrapper.resolveFileInPath("node.exe", null, false);
251+
if (node == null)
252+
{
253+
_log.info("Unable to find node.exe in PATH");
254+
}
255+
}
256+
_log.info("node executable location: " + node);
257+
246258
String output = wrapper.executeWithOutput(Arrays.asList(exe.getPath(), "help"));
247259
if (wrapper.getLastReturnCode() != 0)
248260
{
249261
_log.error("Non-zero exit from testJBrowseCli: " + wrapper.getLastReturnCode());
250262
wrapper.getCommandsExecuted().forEach(_log::error);
251263
_log.error("NODE_PATH: " + System.getenv("NODE_PATH"));
252264

253-
File node = AbstractCommandWrapper.resolveFileInPath("node", null, false);
254-
if (node == null)
255-
{
256-
_log.info("Unable to find node in PATH, trying node.exe");
257-
node = AbstractCommandWrapper.resolveFileInPath("node.exe", null, false);
258-
if (node == null)
259-
{
260-
_log.info("Unable to find node.exe in PATH");
261-
}
262-
}
263-
264-
_log.info("node executable location: " + node);
265-
266265
_log.error("output: ");
267266
_log.error(output);
268267

269268
// Repeat without output going direct to the server log:
270269
try
271270
{
272-
_log.info("Retrying without all output direct to the system log:");
271+
// NOTE: this is only useful if "npx pkg --debug" is used when building the executables
272+
_log.info("Retrying without all output direct to the system log and DEBUG_PKG=1:");
273+
wrapper.addToEnvironment("DEBUG_PKG", "1");
273274
wrapper.execute(Arrays.asList(exe.getPath(), "help"));
274275
}
275276
catch (Exception e)

0 commit comments

Comments
 (0)