[COMPASS-5784] Compass not building on Ubuntu 20.04.4 Created: 01/May/22  Updated: 03/Oct/23  Resolved: 27/Jul/22

Status: Closed
Project: Compass
Component/s: Packaging
Affects Version/s: None
Fix Version/s: No version

Type: Bug Priority: Minor - P4
Reporter: Jack Woehr Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 20.04.4 LTS
Node 14.17.5


Documentation Changes: Not Needed

 Description   

Problem Statement/Rationale

Was building Compass daily from `main` branch, has stopped being buildable in the past couple of weeks

Steps to Reproduce

 

$ nvm use 14.17.5
Now using node v14.17.5 (npm v8.0.0)
$ ./build_compass.sh 
> package-compass
> npm run package-compass --workspace=mongodb-compass --
 
> mongodb-compass@0.0.1-dev.0 package-compass
> hadron-build release
✖  Error: Error: Command failed!  Please try again with debugging enabled.
    at ChildProcess.<anonymous> (/mnt/4bcabbf7-6928-4c6d-bad5-5e01e41e9625/jwoehr/MongoDB/compass/packages/hadron-build/lib/run.js:91:12)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:470:12)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Error: Command failed!  Please try again with debugging enabled.
    at ChildProcess.<anonymous> (/mnt/4bcabbf7-6928-4c6d-bad5-5e01e41e9625/jwoehr/MongoDB/compass/packages/hadron-build/lib/run.js:91:12)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:470:12)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
✖  Error: Error: Command failed!  Please try again with debugging enabled.
    at ChildProcess.<anonymous> (/mnt/4bcabbf7-6928-4c6d-bad5-5e01e41e9625/jwoehr/MongoDB/compass/packages/hadron-build/lib/run.js:91:12)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:470:12)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Error: Command failed!  Please try again with debugging enabled.
    at ChildProcess.<anonymous> (/mnt/4bcabbf7-6928-4c6d-bad5-5e01e41e9625/jwoehr/MongoDB/compass/packages/hadron-build/lib/run.js:91:12)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.emit (domain.js:470:12)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! Lifecycle script `package-compass` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: mongodb-compass@0.0.1-dev.0 
npm ERR!   at location: /mnt/4bcabbf7-6928-4c6d-bad5-5e01e41e9625/jwoehr/MongoDB/compass/packages/compass 

 

 

Expected Results

Compass to build as usual

Actual Results

Build is crashing

Additional Notes

I've tried other versions of Node as well.



 Comments   
Comment by Anna Henningsen [ 27/Jul/22 ]

Alright, thanks for opening the ticket and I’m glad that it works now! 🎉

Comment by Jack Woehr [ 27/Jul/22 ]

Do you need anything else here?

Anna, I think it's working now. Not entirely sure why, but I'm happy for the moment

Thanks again for your patience and help. Onwards with MongoDB & Compass!

Comment by Anna Henningsen [ 27/Jul/22 ]

jwoehr@softwoehr.com Great! Do you need anything else here?

Also, to answer your questions above: Compass uses Python for building native C++ addons, but that is usually fairly uncomplicated. Compass does use ANTLR4 for the aggregation/query export-to-language features

Comment by Jack Woehr [ 27/Jul/22 ]

@AnnaHenningsen I successfully built Compass-Dev

Deleted and re-cloned (again)

updated npm from 8.11.x to 8.15.0

Ran the build as before and this time it completed and the object runs.

Thanks for your help.

Comment by Jack Woehr [ 26/Jul/22 ]

It's certainly a possibility ... the only obvious stuff I see is the typical NVM phrases in .bashrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

I have Python stuff in ~/.local/bin but shouldn't affect node.
I have Golang stuff in my GOPATH but again, shouldn't affect node.
Is ANTLR4 used at all in building Compass? I have some ANTLR4 stuff hanging around.

Comment by Anna Henningsen [ 26/Jul/22 ]

jwoehr@softwoehr.com No worries, it’s just that it’s not obvious at all how to reproduce this/what differentiates this environment from a fresh docker image (and I think something has to!)

Is there any chance that you are setting other environment variables that are affecting Node.js/npm/... behavior, maybe in your .bashrc?

Comment by Jack Woehr [ 26/Jul/22 ]

I must really be operating at a higher level of stupid than you are used to

Comment by Jack Woehr [ 26/Jul/22 ]

I don't see any mysterious node modules that could be lying in wait for my build.
Meanwhile, with the command line you just gave, it's pretty much the same thing.

mongodb-data-service: > tsc -p tsconfig.json
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 precompile
@mongodb-js/compass-auto-updates: > npm run clean
@mongodb-js/compass-components: > @mongodb-js/compass-components@0.17.0 clean
@mongodb-js/compass-components: > rimraf lib
@mongodb-js/compass-components: > @mongodb-js/compass-components@0.17.0 compile
@mongodb-js/compass-components: > tsc -p tsconfig.json
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 clean
@mongodb-js/compass-auto-updates: > rimraf lib
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 compile
@mongodb-js/compass-auto-updates: > cross-env NODE_ENV=production webpack --config ./config/webpack.prod.config.js
@mongodb-js/compass-auto-updates: /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:93
@mongodb-js/compass-auto-updates:                 throw err;
@mongodb-js/compass-auto-updates:                 ^
@mongodb-js/compass-auto-updates: SyntaxError: Unexpected token h in JSON at position 0
@mongodb-js/compass-auto-updates:     at JSON.parse (<anonymous>)
@mongodb-js/compass-auto-updates:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/packages/compass-auto-updates/config/webpack.prod.config.js:13:32)
@mongodb-js/compass-auto-updates:     at Module._compile (/home/jwoehr/work/MongoDB/compass/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
@mongodb-js/compass-auto-updates:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@mongodb-js/compass-auto-updates:     at Module.load (internal/modules/cjs/loader.js:950:32)
@mongodb-js/compass-auto-updates:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@mongodb-js/compass-auto-updates:     at Module.require (internal/modules/cjs/loader.js:974:19)
@mongodb-js/compass-auto-updates:     at require (/home/jwoehr/work/MongoDB/compass/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
@mongodb-js/compass-auto-updates:     at WEBPACK_OPTIONS (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
@mongodb-js/compass-auto-updates:     at requireConfig (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
@mongodb-js/compass-auto-updates:     at /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
@mongodb-js/compass-auto-updates:     at Array.forEach (<anonymous>)
@mongodb-js/compass-auto-updates:     at module.exports (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
@mongodb-js/compass-auto-updates:     at /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:71:45
@mongodb-js/compass-auto-updates:     at Object.parse (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/node_modules/yargs/yargs.js:576:18)
@mongodb-js/compass-auto-updates:     at /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:49:8
@mongodb-js/compass-auto-updates:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:366:3)
@mongodb-js/compass-auto-updates:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
@mongodb-js/compass-auto-updates:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@mongodb-js/compass-auto-updates:     at Module.load (internal/modules/cjs/loader.js:950:32)
@mongodb-js/compass-auto-updates:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@mongodb-js/compass-auto-updates:     at Module.require (internal/modules/cjs/loader.js:974:19)
@mongodb-js/compass-auto-updates:     at require (internal/modules/cjs/helpers.js:101:18)
@mongodb-js/compass-auto-updates:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/node_modules/webpack/bin/webpack.js:156:2)
@mongodb-js/compass-auto-updates:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
@mongodb-js/compass-auto-updates:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@mongodb-js/compass-auto-updates:     at Module.load (internal/modules/cjs/loader.js:950:32)
@mongodb-js/compass-auto-updates:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@mongodb-js/compass-auto-updates:     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
@mongodb-js/compass-auto-updates:     at internal/main/run_main_module.js:17:47
@mongodb-js/compass-auto-updates: npm ERR! Lifecycle script `compile` failed with error: 
@mongodb-js/compass-auto-updates: npm ERR! Error: command failed 
@mongodb-js/compass-auto-updates: npm ERR!   in workspace: @mongodb-js/compass-auto-updates@3.26.1 
@mongodb-js/compass-auto-updates: npm ERR!   at location: /home/jwoehr/work/MongoDB/compass/packages/compass-auto-updates 
@mongodb-js/compass-auto-updates: npm ERR! Lifecycle script `bootstrap` failed with error: 
@mongodb-js/compass-auto-updates: npm ERR! Error: command failed 
@mongodb-js/compass-auto-updates: npm ERR!   in workspace: @mongodb-js/compass-auto-updates@3.26.1 
@mongodb-js/compass-auto-updates: npm ERR!   at location: /home/jwoehr/work/MongoDB/compass/packages/compass-auto-updates 
lerna ERR! npm run bootstrap exited 1 in '@mongodb-js/compass-auto-updates'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
 

Comment by Anna Henningsen [ 26/Jul/22 ]

SyntaxError: Unexpected token h in JSON at position 0

That’s interesting – what if you don’t set DEBUG and instead run npm run bootstrap && env DEBUG='hadron*' npm run package-compass?

Also, for node_modules, only that literal directory name is relevant, but all directories up in the directory hierarchy are generally being traversed and can trip Node.js up when they contain unexpected/incompatible packages.

Comment by Jack Woehr [ 26/Jul/22 ]

 

jwoehr@pop-os:~$ ls n*ls: cannot access 'n*': No such file or directory
jwoehr@pop-os:~$ ls -d .n*
.netbeans  .node_repl_history  .npm  .nvm
jwoehr@pop-os:~$ ls .npm
anonymous-cli-metrics.json  _cacache  _locks  _logs  _npx  _prebuilds  _update-notifier-last-checked
jwoehr@pop-os:~$ ls .npm/_prebuilds/
337927-mongodb-client-encryption-v2.2.0-alpha.1-napi-v4-linux-x64.tar.gz  5cfba9-keytar-v7.7.0-napi-v3-linux-x64.tar.gz
39060c-keytar-v7.9.0-napi-v3-linux-x64.tar.gz                             ccb8d9-kerberos-v2.0.1-napi-v4-linux-x64.tar.gz
394a59-mongodb-client-encryption-v2.2.0-alpha.5-napi-v4-linux-x64.tar.gz  dee9cf-kerberos-v2.0.0-napi-v4-linux-x64.tar.gz
4d489e-mongodb-client-encryption-v2.1.0-napi-v4-linux-x64.tar.gz          fca537-mongodb-client-encryption-v2.0.0-napi-v4-linux-x64.tar.gz
  

Comment by Jack Woehr [ 26/Jul/22 ]

jwoehr@pop-os:~/work/MongoDB$ npm --version
8.15.0
jwoehr@pop-os:~/work/MongoDB$ node --version
v14.20.0
jwoehr@pop-os:~/work/MongoDB$ rm -rf compass
jwoehr@pop-os:~/work/MongoDB$ git clone https://github.com/mongodb-js/compass.git
Cloning into 'compass'...
... etc. ....
jwoehr@pop-os:~/work/MongoDB$ export DEBUG='hadron*'
jwoehr@pop-os:~/work/MongoDB$ cd compass
jwoehr@pop-os:~/work/MongoDB/compass$ npm run bootstrap && npm run package-compass
... etc. ...
@mongodb-js/compass-components: > tsc -p tsconfig.json
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 bootstrap
@mongodb-js/compass-auto-updates: > npm run compile
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 precompile
@mongodb-js/compass-auto-updates: > npm run clean
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 clean
@mongodb-js/compass-auto-updates: > rimraf lib
@mongodb-js/compass-auto-updates: > @mongodb-js/compass-auto-updates@3.26.1 compile
@mongodb-js/compass-auto-updates: > cross-env NODE_ENV=production webpack --config ./config/webpack.prod.config.js
@mongodb-js/compass-auto-updates: /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:93
@mongodb-js/compass-auto-updates:                 throw err;
@mongodb-js/compass-auto-updates:                 ^
@mongodb-js/compass-auto-updates: SyntaxError: Unexpected token h in JSON at position 0
@mongodb-js/compass-auto-updates:     at JSON.parse (<anonymous>)
@mongodb-js/compass-auto-updates:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/packages/compass-auto-updates/config/webpack.prod.config.js:13:32)
@mongodb-js/compass-auto-updates:     at Module._compile (/home/jwoehr/work/MongoDB/compass/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
@mongodb-js/compass-auto-updates:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@mongodb-js/compass-auto-updates:     at Module.load (internal/modules/cjs/loader.js:950:32)
@mongodb-js/compass-auto-updates:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@mongodb-js/compass-auto-updates:     at Module.require (internal/modules/cjs/loader.js:974:19)
@mongodb-js/compass-auto-updates:     at require (/home/jwoehr/work/MongoDB/compass/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
@mongodb-js/compass-auto-updates:     at WEBPACK_OPTIONS (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
@mongodb-js/compass-auto-updates:     at requireConfig (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
@mongodb-js/compass-auto-updates:     at /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
@mongodb-js/compass-auto-updates:     at Array.forEach (<anonymous>)
@mongodb-js/compass-auto-updates:     at module.exports (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/utils/convert-argv.js:121:15)
@mongodb-js/compass-auto-updates:     at /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:71:45
@mongodb-js/compass-auto-updates:     at Object.parse (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/node_modules/yargs/yargs.js:576:18)
@mongodb-js/compass-auto-updates:     at /home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:49:8
@mongodb-js/compass-auto-updates:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/node_modules/webpack-cli/bin/cli.js:366:3)
@mongodb-js/compass-auto-updates:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
@mongodb-js/compass-auto-updates:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@mongodb-js/compass-auto-updates:     at Module.load (internal/modules/cjs/loader.js:950:32)
@mongodb-js/compass-auto-updates:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@mongodb-js/compass-auto-updates:     at Module.require (internal/modules/cjs/loader.js:974:19)
@mongodb-js/compass-auto-updates:     at require (internal/modules/cjs/helpers.js:101:18)
@mongodb-js/compass-auto-updates:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/node_modules/webpack/bin/webpack.js:156:2)
@mongodb-js/compass-auto-updates:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
@mongodb-js/compass-auto-updates:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
@mongodb-js/compass-auto-updates:     at Module.load (internal/modules/cjs/loader.js:950:32)
@mongodb-js/compass-auto-updates:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
@mongodb-js/compass-auto-updates:     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
@mongodb-js/compass-auto-updates:     at internal/main/run_main_module.js:17:47
@mongodb-js/compass-auto-updates: npm ERR! Lifecycle script `compile` failed with error: 
@mongodb-js/compass-auto-updates: npm ERR! Error: command failed 
@mongodb-js/compass-auto-updates: npm ERR!   in workspace: @mongodb-js/compass-auto-updates@3.26.1 
@mongodb-js/compass-auto-updates: npm ERR!   at location: /home/jwoehr/work/MongoDB/compass/packages/compass-auto-updates 
@mongodb-js/compass-auto-updates: npm ERR! Lifecycle script `bootstrap` failed with error: 
@mongodb-js/compass-auto-updates: npm ERR! Error: command failed 
@mongodb-js/compass-auto-updates: npm ERR!   in workspace: @mongodb-js/compass-auto-updates@3.26.1 
@mongodb-js/compass-auto-updates: npm ERR!   at location: /home/jwoehr/work/MongoDB/compass/packages/compass-auto-updates 
lerna ERR! npm run bootstrap exited 1 in '@mongodb-js/compass-auto-updates'

lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.

Comment by Anna Henningsen [ 26/Jul/22 ]

jwoehr@softwoehr.com Well that is surprising! What npm version are you using? Are there any node_modules directories up the directory tree (e.g. /home/jwoehr/node_modules, /home/jwoehr/work/node_modules or similar)? Is this a fresh checkout of Compass?

As I said, the steps I described above were run on a clean Ubuntu 20.04 docker image, so there is a good chance that this is about something specific to the external environment.

Comment by Jack Woehr [ 26/Jul/22 ]

Shell is just Ubuntu Linux bash

Comment by Jack Woehr [ 26/Jul/22 ]

This is my latest output:

@mongodb-js/explain-plan-helper: > @mongodb-js/explain-plan-helper@0.11.1 compile
@mongodb-js/explain-plan-helper: > tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs
hadron-react-buttons: /home/jwoehr/work/MongoDB/compass/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:59
hadron-react-buttons:         normalModuleFactory.hooks.factorize.tapAsync(
hadron-react-buttons:                                             ^
hadron-react-buttons: TypeError: Cannot read property 'tapAsync' of undefined
hadron-react-buttons:     at ExternalModuleFactoryPlugin.apply (/home/jwoehr/work/MongoDB/compass/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:59:39)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/node_modules/peer-deps-externals-webpack-plugin/src/index.js:15:11
hadron-react-buttons:     at SyncHook.eval [as call] (eval at create (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
hadron-react-buttons:     at SyncHook.lazyCompileHook (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/Hook.js:154:20)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:665:23
hadron-react-buttons:     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
hadron-react-buttons:     at AsyncSeriesHook.lazyCompileHook (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/Hook.js:154:20)
hadron-react-buttons:     at Compiler.compile (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:662:28)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:321:11
hadron-react-buttons:     at Compiler.readRecords (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:529:11)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:318:10
hadron-react-buttons:     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
hadron-react-buttons:     at AsyncSeriesHook.lazyCompileHook (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/Hook.js:154:20)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:315:19
hadron-react-buttons:     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
hadron-react-buttons:     at AsyncSeriesHook.lazyCompileHook (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/tapable/lib/Hook.js:154:20)
hadron-react-buttons:     at Compiler.run (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/lib/Compiler.js:312:24)
hadron-react-buttons:     at processOptions (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack-cli/bin/cli.js:353:14)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack-cli/bin/cli.js:364:3
hadron-react-buttons:     at Object.parse (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/yargs/yargs.js:576:18)
hadron-react-buttons:     at /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack-cli/bin/cli.js:49:8
hadron-react-buttons:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack-cli/bin/cli.js:366:3)
hadron-react-buttons:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
hadron-react-buttons:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
hadron-react-buttons:     at Module.load (internal/modules/cjs/loader.js:950:32)
hadron-react-buttons:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
hadron-react-buttons:     at Module.require (internal/modules/cjs/loader.js:974:19)
hadron-react-buttons:     at require (internal/modules/cjs/helpers.js:101:18)
hadron-react-buttons:     at Object.<anonymous> (/home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons/node_modules/webpack/bin/webpack.js:156:2)
hadron-react-buttons:     at Module._compile (internal/modules/cjs/loader.js:1085:14)
hadron-react-buttons:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
hadron-react-buttons:     at Module.load (internal/modules/cjs/loader.js:950:32)
hadron-react-buttons:     at Function.Module._load (internal/modules/cjs/loader.js:790:12)
hadron-react-buttons:     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
hadron-react-buttons:     at internal/main/run_main_module.js:17:47
hadron-react-buttons: npm ERR! Lifecycle script `compile` failed with error: 
hadron-react-buttons: npm ERR! Error: command failed 
hadron-react-buttons: npm ERR!   in workspace: hadron-react-buttons@5.9.0 
hadron-react-buttons: npm ERR!   at location: /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons 
hadron-react-buttons: npm ERR! Lifecycle script `bootstrap` failed with error: 
hadron-react-buttons: npm ERR! Error: command failed 
hadron-react-buttons: npm ERR!   in workspace: hadron-react-buttons@5.9.0 
hadron-react-buttons: npm ERR!   at location: /home/jwoehr/work/MongoDB/compass/packages/hadron-react-buttons 
lerna ERR! npm run bootstrap exited 1 in 'hadron-react-buttons'
lerna WARN complete Waiting for 6 child processes to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mongodb-compass-monorepo@ bootstrap: `npm install && lerna run bootstrap --stream`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mongodb-compass-monorepo@ bootstrap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jwoehr/.npm/_logs/2022-07-26T13_46_57_335Z-debug.log
 

Comment by Anna Henningsen [ 26/Jul/22 ]

jwoehr@softwoehr.com And the output is the exact same as above in the ticket description? Are you running in some kind of special shell (something other than bash where setting env vars doesn’t work the same way)? Or otherwise a special setup?

Comment by Jack Woehr [ 26/Jul/22 ]

What I"m doing is 

export DEBUG='hadron*'
npm run bootstrap && npm run package-compass

Comment by Anna Henningsen [ 26/Jul/22 ]

jwoehr@softwoehr.com Yeah, that should result in more verbose output. Does anything in your scripts reset DEBUG to another value? Are you running npm run package-compass directly?

Comment by Jack Woehr [ 26/Jul/22 ]

DEBUG='hadron*' 

I've tried setting this with 

export DEBUG='hadron*'

before calling the scripts but that doesn't seem to have the desired effect, PMI, how do I set the env correctly to get good debugging, Anna?

Comment by Anna Henningsen [ 26/Jul/22 ]

jwoehr@softwoehr.com Apologies for the delay! As the output hints at, this is something that is more easily looked into with debugging enabled (e.g. by setting DEBUG='hadron*' in the environment variables while building).

For what it’s worth, I tried building and packaging Compass in an Ubuntu 20.04 docker image, to get an idea of the requirements. I used:

  • The apt dependencies listed in https://www.electronjs.org/docs/latest/development/build-instructions-linux – almost certainly not all of these are necessary
  • For Compass specifically, apt install libkrb5-dev libsecret-1-dev
  • Optionally: apt install rpm for building .rpm packages as well
  • Node.js 14.20.0 via nvm install 14 and npm@8.x via npm i -g npm@8.x
  • Finally, ran npm run bootstrap && npm run package-compass in the compass checkout
Generated at Wed Feb 07 22:40:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.