eclipse-theia / generator-theia-extension

A Yeoman generator for extensions to the Theia IDE
Other
49 stars 37 forks source link

Can't start browser after starting electron #190

Closed peter-jerry-ye closed 8 months ago

peter-jerry-ye commented 8 months ago

Steps to reproduce:

Then the error comes up:

/Users/ye/Documents/theia-app/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-bd225a.js:16
  throw new Error('node-loader:\n' + error);
  ^

Error: node-loader:
Error: Module did not self-register: '/Users/ye/Documents/theia-app/browser-app/lib/backend/native/drivelist.node'.
    at ../node_modules/drivelist/build/Release/drivelist.node (/Users/ye/Documents/theia-app/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-bd225a.js:16:9)
    at __webpack_require__ (/Users/ye/Documents/theia-app/browser-app/lib/backend/main.js:699:42)
    at module.exports (/Users/ye/Documents/theia-app/browser-app/lib/backend/main.js:155:34)
    at ../node_modules/drivelist/js/index.js (/Users/ye/Documents/theia-app/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-bd225a.js:31974:27)
    at __webpack_require__ (/Users/ye/Documents/theia-app/browser-app/lib/backend/main.js:699:42)
    at ../node_modules/@theia/core/lib/node/env-variables/env-variables-server.js (/Users/ye/Documents/theia-app/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-bd225a.js:5480:19)
    at __webpack_require__ (/Users/ye/Documents/theia-app/browser-app/lib/backend/main.js:699:42)
    at ../node_modules/@theia/core/lib/node/env-variables/index.js (/Users/ye/Documents/theia-app/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-bd225a.js:5613:14)
    at __webpack_require__ (/Users/ye/Documents/theia-app/browser-app/lib/backend/main.js:699:42)
    at ../node_modules/@theia/core/lib/node/backend-application-module.js (/Users/ye/Documents/theia-app/browser-app/lib/backend/vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-bd225a.js:4781:25)

Versions:

JonasHelming commented 8 months ago

I can reproduce this. @sdirix Could you check whether we do no clean something correctly?

sdirix commented 8 months ago

We need to declare the cacheRoot so that this works out of the box. I'll open a PR.

sdirix commented 8 months ago

@peter-jerry-ye see here on how to fix the issue for you locally. For the fix to take effect you should delete the node_modules as well as any .browser_modules directories you may currently have.

peter-jerry-ye commented 8 months ago

@peter-jerry-ye see here on how to fix the issue for you locally. For the fix to take effect you should delete the node_modules as well as any .browser_modules directories you may currently have.

I confirm it fixes the issue if we build then start. However it seems that yarn watch can still cause issue.

sdirix commented 8 months ago

@peter-jerry-ye see here on how to fix the issue for you locally. For the fix to take effect you should delete the node_modules as well as any .browser_modules directories you may currently have.

I confirm it fixes the issue if we build then start. However it seems that yarn watch can still cause issue.

You are correct. This will be fixed with https://github.com/eclipse-theia/generator-theia-extension/pull/178

JonasHelming commented 8 months ago

@peter-jerry-ye Could you maybe verify the new version on mater with the fixes whether everything works now for you? If you clone this repo and then npm link you can test the updated version.

Thanks!

peter-jerry-ye commented 8 months ago

Looks good to me.