xeokit-sdk
xeokit-sdk copied to clipboard
Module not found: Error: Can't resolve 'asciify-image'
"@xeokit/xeokit-sdk": "^2.2.0"
WARNING Compiled with 2 warnings 06:24:26 warning in ./node_modules/@xeokit/xeokit-sdk/dist/xeokit-sdk.min.es.js
Critical dependency: the request of a dependency is an expression
warning in ./node_modules/@xeokit/xeokit-sdk/dist/xeokit-sdk.min.es.js
Module not found: Error: Can't resolve 'asciify-image' in '\node_modules@xeokit\xeokit-sdk\dist'
vsc writes this error to the console in the vue3 project
same problem but in react project
same problem in a react project
Same problem in angular project also with version 2.1.0. In my case if i rollback to version 1.9.0 this problem isn't present.
Why did you mark it as completed when error still occur?
Some info for anyone willing to contribute a fix: This is not a bug in xeokit code, and seems to be introduced by one of the loaders.gl
libraries, which are used by various xeokit loader plugins. There may be a rollup configuration that can work around this.
Same problem here in a Vue3 Project. I solved that downgrading until hitting v2.0.0. Whenever I get any version higher than that it starts throwing the warning.
@xeolabs Can you give us some more details on your comment so we maybe can arise that bug on the loaders.gl project?
@mvalero I just did a text search for "ascify-image" within the xeokit-sdk ./src
and ./node_modules
found it in the loaders.gl
core library.
I suspect it's either a loaders.gl compatibility with React and Vue, or some modification is needed to xeokit's Rollup/Babel configuration.
I'd recommend reproducing the issue somehow in a trivial dummy-project that just uses loaders.gl, maybe copying relevant configs from xeokit's Rollup/Babel configs etc. Then that would determine if it's some sort of CJS build issue or React/View incompatibility within loaders.gl. Then that would reproduce the bug for logging the issue (if existing) for loaders.gl.
Before doing that though, I'd also recommend looking first to see if loaders.gl has any caveats or tips on Vue/React integrations. Maybe also look around for any React/Vue apps build on loaders.gl, see if they do things different in their build scripts etc.