Open hopezh opened 2 years ago
Hi @hopezh,
I am not entirely sure what's wrong here. I am assuming webpack
is doing things differently than parcel.js
and something is broken regarding imports.
Would you mind sharing your webpack config? Or even the whole project?
Thank you, @liberostelios
Unfortunately, the project files (web dev files and CityJSON data files) are confidential, and I'm unable to post it here.
The three webpack related config files in the "bundler" folder are attached here for your reference.
I think this is because your webpack configuration doesn't play well with the hybrid (and, I have to admit, a bit sloppy 😊) import of TypeScript and JavaScript files used.
Since I am not able to reproduce the issue, I'd like ask your help. Here is an hacky way to figure out if this is the case:
node_modules/cityjson-threejs-loader/src/parsers/CityJSONWorkerParser.js
.import { POINTS, LINES, TRIANGLES } from './geometry/GeometryData';
It might fail again, but the error message should complain about other modules not included (my assumption is that it will complain about TriangleParser
).
If that's the case, there are two ways to resolve this:
If you are on a hurry, you can keep doing this for all import lines in the code for which the code complains, until I fix it on my end. But this isn't a proper solution.
Let me know what you get and we see.
I got the following error after using
import { CityJSONLoader, CityJSONWorkerParser } from "cityjson-threejs-loader";
inscript.js
.The module was installed via
npm i cityjson-threejs-loader
.May I ask what the error means, and how to fix it?
Thanks.