I’m trying to import codemirror/lang-javascript from a local clone of the repo. I installed using
npm i ./lang-javascript
I get the following error:
extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
Same code works fine when I switch back to the published package.
Yeah linking packages like that doesn’t work—it’ll have its own copy of all the @codemirror packages, as does the project you’re linking them into, so you’ll be loading multiple copies of those. You can copy the content of the build directory’s dist/ from your build into a copy of the package installed in your project. Or even symlink in just the dist/ part. Or use an npm workspace that has both projects in it.