three-inspect icon indicating copy to clipboard operation
three-inspect copied to clipboard

Vanilla JS - failed to resolve @threlte/core

Open jmschrack opened this issue 1 year ago • 1 comments

I tried adding three-inspect to an existing project I have that is written using vanilla js in Vite and ThreeJS Unfortunately, I run into this error when I try to run dev.

[ERROR] Failed to resolve entry for package "@threlte/core". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@threlte/core" package [plugin vite:dep-pre-bundle]

node_modules/three-inspect/dist/internal/context.js:1:32: 1 │ import { currentWritable } from '@threlte/core';

jmschrack avatar Feb 08 '24 15:02 jmschrack

Thanks for reporting! The vanilla export has been fixed in 0.5.0. Check out the docs for setup (which has changed) or this stackblitz example: https://stackblitz.com/edit/vitejs-vite-pxodhz?file=src%2Fmain.ts. Let me know if that fixes things for you.

michealparks avatar Jun 06 '24 23:06 michealparks