# Cannot import certain npm modules with shadow-cljs

**URL:** https://clojureverse.org/t/cannot-import-certain-npm-modules-with-shadow-cljs/9456
**Category:** Troubleshooting
**Tags:** shadow-cljs, clojurescript
**Created:** [October 25, 2022, 7:47am UTC](https://clojureverse.org/t/cannot-import-certain-npm-modules-with-shadow-cljs/9456 "2022-10-25T07:47:35Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![p-himik](https://clojureverse.org/user_avatar/clojureverse.org/p-himik/32/4137_2.png) [@p-himik](https://clojureverse.org/u/p-himik)
#### Post date: [October 25, 2022, 8:34am UTC](https://clojureverse.org/t/cannot-import-certain-npm-modules-with-shadow-cljs/9456/2 "2022-10-25T08:34:58Z")

</div>

Let’s go through `ecpair` first.  
The error complains about this location: [UNPKG - ecpair](https://unpkg.com/browse/ecpair@2.1.0/src/ecpair.js#L68)  
As you can see, it’s a class field. And, unfortunately, GCC doesn’t support class fields yet: [Add Support for Class Fields · Issue #2731 · google/closure-compiler · GitHub](https://github.com/google/closure-compiler/issues/2731)  
I don’t know what the preferred way of fixing such an error is. Perhaps webpack could somehow be used. Or you might be able to vendor in the library. Or maybe use some older version of it that doesn’t use class fields - that was exactly what I did with ANTLR.

Regarding `crawlee` - that particular line is here: [https://unpkg.com/browse/@crawlee/core@3.1.0/errors.js#L27](https://unpkg.com/browse/@crawlee/core@3.1.0/errors.js#L27)  
And the column points somewhere around `??` which is called “nullish coalescing operator”, which is supposed to be supported by GCC since v20200315. Is there a chance your CLJS version is out of date or you explicitly depend on an old GCC version? I just tried compiling a simple script that only requires `["crawlee"]` and it worked just fine with shadow-cljs 2.20.4.

---

_[View the full topic](https://clojureverse.org/t/cannot-import-certain-npm-modules-with-shadow-cljs/9456)._
