Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch breaks application start #176

Closed
JonasHelming opened this issue Sep 21, 2023 · 4 comments · Fixed by #178
Closed

Watch breaks application start #176

JonasHelming opened this issue Sep 21, 2023 · 4 comments · Fixed by #178

Comments

@JonasHelming
Copy link
Contributor

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.

@JonasHelming
Copy link
Contributor Author

@sdirix do you have an idea here?

@sdirix
Copy link
Contributor

sdirix commented Sep 21, 2023

Looking at the scripts the following is happening:

  • watch is executed in all packages
  • The watch 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

  • Don't offer a single watch script in the root, but offer watch:browser and watch:electron, or
  • Keep the watch script but only watch the browser variant

@JonasHelming
Copy link
Contributor Author

I would be in favor of the first option, @vince-fugnitto WDYT?

@vince-fugnitto
Copy link
Member

I'd be in favor of separating the watch scripts for each application target (first option).

JonasHelming added a commit that referenced this issue Sep 28, 2023
fixed #176

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
JonasHelming added a commit that referenced this issue Sep 28, 2023
tortmayr pushed a commit that referenced this issue Sep 28, 2023
fixed #176

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
JonasHelming added a commit that referenced this issue Jan 5, 2024
fixed #176

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants