core-typed

lambder 2023-08-29T19:07:35.595209Z

hello, I’m trying to type check my cljs code. when I do: (*typed.clojure/check-ns-cljs* 'views.main) I’m getting :

(typed.clojure/check-ns-cljs 'views.main)
Start checking views.main
Unexpected error (ExceptionInfo) compiling at (REPL:1).
No such namespace: react, could not locate react.cljs, react.cljc, or JavaScript source providing "react" in file /.../views/main.cljs 
the views.main namespace is declared:
(ns views.main
  (:refer-clojure :exclude [prn pr print println])
  (:require [cljs.core.async :refer [go go-loop promise-chan close! chan put! <!]]
            [clojure.core.rrb-vector :as fv]
            [clojure.string :as str]
            [goog.object :as g]
            [promesa.core :as p]
            [re-chain.core :as chain]
            [re-frame.core :as rf]
            ["react" :as react]
            [reagent.core :as r]
            [reagent.core :as reagent]
            [reagent.dom :as dom]))

2023-08-31T04:04:41.666419Z

There must be something fundamental that the checker is blind to, could you post a reproduction project? It's been several years since I looked at cljs.

lambder 2023-09-05T20:03:05.893489Z

@ambrosebs usage of strings in require are described here https://shadow-cljs.github.io/docs/UsersGuide.html#npm

lambder 2023-08-29T19:07:43.710409Z

any ideas? please?