xeokit-sdk icon indicating copy to clipboard operation
xeokit-sdk copied to clipboard

Module not found: Error: Can't resolve 'asciify-image'

Open NeluQi opened this issue 3 years ago • 7 comments

"@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'

image

vsc writes this error to the console in the vue3 project

NeluQi avatar Dec 09 '21 03:12 NeluQi

same problem but in react project image

WichiL avatar Dec 09 '21 16:12 WichiL

same problem in a react project

ghost avatar Dec 21 '21 07:12 ghost

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.

georgy-alarcon avatar Feb 15 '22 09:02 georgy-alarcon

Why did you mark it as completed when error still occur?

KuNman avatar Aug 11 '22 14:08 KuNman

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.

xeolabs avatar Aug 11 '22 15:08 xeolabs

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 avatar Aug 16 '22 15:08 mvalero

@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.

xeolabs avatar Aug 16 '22 15:08 xeolabs