Fork me on GitHub
#shadow-cljs
<
2021-08-09
>
tianshu12:08:03

How can I debug something like this, the error occurs when page hot-reload.

Uncaught ReferenceError: $map__115133 is not defined
    at Object.shadow$cljs$devtools$client$env$src_is_loaded_QMARK_ [as src_is_loaded_QMARK_] (env.cljs:257)
    at eval (env.cljs:279)
    at eval (core.cljs:5203)
    at eval (core.cljs:5203)
    at Object.eval [as sval] (core.cljs:3452)
    at Object.eval [as cljs$core$ISeqable$_seq$arity$1] (core.cljs:3509)
    at Object.cljs$core$seq [as seq] (core.cljs:1236)
    at Function.eval [as cljs$core$IFn$_invoke$arity$3] (core.cljs:2493)
    at Object.eval [as cljs$core$IReduce$_reduce$arity$3] (core.cljs:3519)
    at Function.eval [as cljs$core$IFn$_invoke$arity$3] (core.cljs:2565)
Looks like something related to path? but the build succeed without errors, and page load with errors.

tianshu12:08:03

Looks like upgrade to latest shadow-cljs fix the problem.

borkdude12:08:07

@doglooksgood Is this a node app?

borkdude12:08:46

You might have to include something like:

:js-options {:keep-as-import #{"fs" "module" "path"
                                                   "react" "react-dom"}}
in your build. Wild guess.

tianshu12:08:10

No, it's not a note app. I think there's something wrong in shadow-cljs 2.14.6.

borkdude12:08:35

FWIW 2.15.3 is already out

tianshu12:08:43

I upgrade to 2.15.3, the problem is gone.

Shantanu Kumar17:08:57

I'm facing a weird error (Shadow-CLJS 2.15.3, re-frame 1.2.0 etc.) that happens only in the CI environment:

...
shadow-cljs - dependencies updated
[:webapp] Compiling ...
The required namespace "react-dom" is not available, it was required by "reagent/dom.cljs".

Shantanu Kumar17:08:17

The same command (same Java and Node.js versions) works fine in my local. Any pointers would be helpful.

thheller17:08:23

did you install the npm packages? edoes node_modules/react-dom exist?

Shantanu Kumar17:08:56

The npm packages are automatically installed, but let me confirm that. Thanks!

Shantanu Kumar17:08:40

It was npm package cache issue. Sorry about the noise.

jmckitrick20:08:53

Hi all, I’m deploying a luminus app with shadow-cljs to heroku. What’s the trick to getting the shadow part to find the dependencies it needs? I’m getting this:

jmckitrick20:08:17

remote:    The required namespace "react" is not available, it was required by "reagent/core.cljs".

jmckitrick20:08:33

Locally I just run npm install

Ryan Jerue21:08:06

What does your package.json look like?

Ryan Jerue21:08:32

It could also be that npm install is not getting run as part of what is going to heroku

jmckitrick21:08:43

That’s where I’m stuck, after getting a bit farther.

jmckitrick21:08:55

I’ve added this non-working step:

jmckitrick21:08:05

["shell" "npm" "install"]

jmckitrick21:08:15

in uberjars prep-tasks

jmckitrick10:08:36

I needed to add a nodejs buildpack to my Heroku app config.