Version 1.39.0 migrate problem

I migrate from 1.32.0 to 1.39.0, I get the error

it says that the addon.node module is not found, but the addon.node is indeed in applications\electron\lib\backend\native/, why error?

another problem is
’ You are attempting to construct ‘class extends …’ in a synchronous way
but it has asynchronous dependencies.

the black area is my class content. do not understand ‘in a synchronous way
but it has asynchronous dependencies’

As for the inversify issue, please see our migration guide.

As for the bundling issue. I’m not totally sure what’s wrong there. Does the application exhibit the same behavior when just started through theia start? Have you pointed your main entry in your Electron application to lib/backend/electron-main.js?

for the bundling issue, my application is based on theia-blueprint. before migrating I use 1.32.0, I was also not sure what was wrong with the problem. I will try to debug and find what happens. when I use 1.38.0 it is still ok, maybe the new lib\backend folder causes the problem.

1. I find the bunding problem, the error happens when loading the addon.node file. my addon.node has a dependency dll file. missing the file causes the error. I copy my dll file manually in to lib\backend folder it is ok.
2. Is there any method that can copy the dll file automatically when build? when using 1.32.0 it is ok, do not need to copy manually. my extension generates addon.node files tree as follow. the mathlibrary_api.dll is the file needs copy manually in version 1.39.0

@wss You can use the CopyWebpackPlugin to copy the file from the Release folder to the native folder automatically.

I try the CopyWebpackPlugin, may be I am not good at it. I try and try but still not copy file, follow step

  1. I want to copy dotamonitor.dll to lib/backend
  2. I change my webpack.config.js
  3. I do not know what step wrong, the datamonitor.dll not be copied to backend folder

I believe the following should work:

  from: path.resolve(__dirname, 'dataMonitor.dll'),
  to: path.resolve(__dirname, 'lib', 'backend') + path.sep

it is a pity, still not working,
I look at CopyWebpackPlugin in gen-webpack.config.js and do not find any special.

a little bit of headache, why not affect