Closed JonasHelming closed 10 months ago
@sdirix do you have an idea here?
Looking at the scripts the following is happening:
watch
is executed in all packageswatch
in browser-app
and electron-app
both trigger rebuild
, i.e. theia rebuild:browser
and theia rebuild:electron
.The native Node modules can only be built for either browser
or electron
, not both at the same time. I'm also not sure what happens when both rebuilds are executed in parallel, i.e. whether one of them then "wins" or maybe even both are broken.
drivelist.node
is one of the native modules, so yarn start
fails for you because it's now the electron
version or broken by the parallel watch.
Suggestion: Either
watch:browser
and watch:electron
, orI would be in favor of the first option, @vince-fugnitto WDYT?
I'd be in favor of separating the watch scripts for each application target (first option).
Create a template, e.g. hello world yarn watch on the root level change something wait until the rebuild finishes cd browser-app & yarn start
=> /home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0ccbd3.js:16 throw new Error('node-loader:\n' + error); ^
Error: node-loader: Error: Module did not self-register: '/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/native/drivelist.node'. at Object.../node_modules/drivelist/build/Release/drivelist.node (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0ccbd3.js:16:9) at webpack_require__ (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/main.js:667:42) at module.exports (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/main.js:155:34) at Object.../node_modules/drivelist/js/index.js (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0ccbd3.js:30872:27) at webpack_require (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/main.js:667:42) at Object.../node_modules/@theia/core/lib/node/env-variables/env-variables-server.js (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0ccbd3.js:5204:19) at __webpack_require (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/main.js:667:42) at Object.../node_modules/@theia/core/lib/node/env-variables/index.js (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0ccbd3.js:5313:14) at __webpack_require__ (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/main.js:667:42) at Object.../node_modules/@theia/core/lib/node/backend-application-module.js (/home/jonas/tmp/theiatest/generatechangebuild/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0ccbd3.js:4568:25) Done in 1.19s.