cherry

Benjamin 2023-07-30T07:58:16.580539Z

localhost/:1 Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/cherry-cljs_core__js.js?v=c26eb8e5' does not provide an export named 'str'
I am trying to run the vite example and str is not defined somewhere

borkdude 2023-07-30T08:16:47.340199Z

hey. you can see str in action here: https://dev.livecodes.io/?template=clojurescript also it works here: https://squint-cljs.github.io/cherry/ try (prn (str "foo" "bar"))

Benjamin 2023-07-30T08:18:10.877099Z

now my mind is racing of where I can use that confetti

borkdude 2023-07-30T08:18:51.378059Z

I'll try the vite example later today. were you running it as is, or are you running it with a change?

Benjamin 2023-07-30T08:19:15.386599Z

as-is

Benjamin 2023-07-30T08:19:45.588369Z

// node_modules/cherry-cljs/core.js
function assoc_BANG_(m, k, v, ...kvs) {
  m[k] = v;
  if (kvs.length != 0) {
    return assoc_BANG_(m, ...kvs);
  } else
    return m;
}
function dissoc_BANG_(m, k) {
  delete m[k];
  return m;
}
function keyword(s) {
  return s;
}
function prn(...args) {
  console.log(...args);
}
function nth(coll, idx) {
  return coll[idx];
}
export {
  assoc_BANG_,
  dissoc_BANG_,
  keyword,
  nth,
  prn
};
//# sourceMappingURL=cherry-cljs_core__js.js.map
vite/node_modules/.vite/deps/cherry-cljs_core__js.js

Benjamin 2023-07-30T08:19:56.233959Z

there is no str there like the error says

borkdude 2023-07-30T08:20:29.717999Z

are you running cherry locally or from npm? please provide more details :)

borkdude 2023-07-30T08:20:57.493759Z

if you are running the project locally, you might need to put it in compile mode, with bb dev first

Benjamin 2023-07-30T08:21:32.001759Z

I thought I did what the readme said, npm i and bb dev in the vite dir

borkdude 2023-07-30T08:21:46.462549Z

btw, this looks very wrong, the implementation above looks like squint

borkdude 2023-07-30T08:22:48.697059Z

I'm not able to look into it now, perhaps later today

borkdude 2023-07-30T08:23:28.170549Z

one thing to note is that the cherry version if very much out of date in that package.json

borkdude 2023-07-30T08:23:31.485799Z

so upgrading it might help

Benjamin 2023-07-30T08:23:40.621909Z

no rush. That sounds promising

Benjamin 2023-07-30T08:26:06.921999Z

fixed 🙂

borkdude 2023-07-30T08:27:23.134259Z

cool PR welcome :)