Closed fatalstar closed 10 months ago
Hi @fatalstar, thanks for the report. Can you provide the following details please?
@itwin/presentation-backend
version that you're using?Hi, @grigasp Thanks for reply!
The ModeTree display normal before create package, but get error after that, so I guess there is something missed in package config?
Thanks. I wouldn't call invalid labels an error, but, in any case, they're all "Not specified" because the @itwin/presentation-backend
package can't find its assets.
Before version 4.2
the package used to deliver an assets
directory. In most situations we were able to find its location automatically, in some others apps could configure it using PresentationManagerProps.presentationAssetsRoot
prop when initializing Presentation
.
However, we noticed that this is an issue with Electron, because we weren't able to find those assets in the ASAR package. This issue was resolved with the 4.2
release.
Hi, @grigasp I updated itwin to 4.2, but it still can not find assets in ASAR, ( either asar.unpack ), I'm using "electron": "^24.6.5" and "electron-packager": "^17.1.2".
Thanks for the answer, so I could use presentationAssetsRoot config to fix this issue. It display right labels now. Thank you very much!
I try to pack itwin electron viewer demo by using 'electron-packager'. Set the config like this : (because there are some .dll files) asar: { unpackDir:
node_modules/@bentley/imodeljs-native/**
, },The model tree is normal when in development, but error after packaged.
I wonder if this problem is related to asar configuration (maybe presentation), and how to fix it.
Thanks!