-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Import issue when using web-ifc-viewer 1.0.218 #246
Comments
Ok, I have more information. Webpack created this breaking change, so now, it seems that you need to change the import for "base-types". There is a webpack configuration for projects like me to keep the old way of doing things working. As explained in this stack overflow post : https://stackoverflow.com/questions/69427025/programmatic-webpack-jest-esm-cant-resolve-module-without-js-file-exten We need to add in the file "webpack.config.js", in the part "module.rules", the following code :
Unfortunately, this can be a lot of work. As most projects, like mine, uses bundlers like "create-react-app", we do not have a direct access to this file. There are ways to access it, but it is impractical. Right now, I will stay in 2.0.217 and wait for dust to settle. There are an issue opened on create react app to add this configuration in their default webpack config : But as of my understanding, it will only be solved for new react project (not 100% sure about that though) So it seems to me that you also should update your library to keep up with this new standard. As it is only a slight change in the import. |
We have officially released the new library components on September 20. This library substitutes web-ifc-three and web-ifc-viewer. Both WIV and WIT will remain up, but they will be deprecated and won't be maintained any longer. You can find the new docs here (the # is free, but we will likely make them public soon). All our efforts are going towards components now. The API is very similar, so I strongly suggest you make the leap and start using it. You can start using it now (check out the latest alpha version in npm or see the big-restructure branch in the repo. If you still face this issue with it, you can open an issue there and we'll take a look. |
We use "web-ifc-viewer:1.0.216" in our project and it works fine.
We tried to update to 1.0.217 and it work fine.
Then, we tried to update to the version "1.0.218" and we have the following error when running "npm start":
We also have the following warning:
And the following error:
We have the exact same issue with CameraProjections.
This happens when we build the project from scratch (I mean, I deleted the "node_modules", rebuild everything, and then it happens).
When I switch back to version 1.0.217, and rebuild the project, the error goes away.
I can't find why this happens, but it seems that somethin in ifc.js typescript types is broken.
Maybe you can point me in the right direction or fix it on you end ?
I use ReactJS 18.2.0 and Typescript 4.9.5. I stay available if you need more information.
Btw, great project :) Thank you very much ! Keep up the good work !
The text was updated successfully, but these errors were encountered: