This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-06
Channels
- # announcements (1)
- # babashka (7)
- # beginners (93)
- # bristol-clojurians (1)
- # cider (7)
- # clj-kondo (42)
- # cljs-dev (9)
- # clojure (67)
- # clojure-europe (4)
- # clojure-france (4)
- # clojure-germany (2)
- # clojure-italy (3)
- # clojure-nl (10)
- # clojure-uk (62)
- # clojurescript (11)
- # clojurex (3)
- # conjure (77)
- # cursive (16)
- # datomic (105)
- # docker (4)
- # editors (3)
- # events (5)
- # fulcro (34)
- # jobs (1)
- # juxt (7)
- # kaocha (7)
- # lambdaisland (3)
- # lein-figwheel (2)
- # leiningen (19)
- # malli (14)
- # meander (6)
- # mid-cities-meetup (6)
- # off-topic (20)
- # pedestal (2)
- # reagent (17)
- # reitit (7)
- # remote-jobs (1)
- # shadow-cljs (17)
- # spacemacs (23)
- # specter (2)
- # tools-deps (34)
A small question, I've installed a package on my project (vega-lite) using npm install some time ago. today I ran "npm install vega-lite" again, to get a new version. However, when I run shadow-cljs, it still uses the old version. How do I make it use the new version?
I tried removing the package, and shadow-cljs noticed it's missing, but when re-installing it it still seems to compile the old version somehow
@ozfraier shadow-cljs should be using whatever is at node_modules/vega-lite
. so make sure that is actually the version you want.
On node modules, the version in package.json is 4.9.0, But looking at the source in chromium development tools, it shows a file that starts with:
shadow$provide["module$node_modules$vega_lite$build$vega_lite"] = function(global,require,module,exports) {
var Buffer = require('buffer').Buffer;
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.vegaLite = {}));
}(this, (function (exports) { 'use strict';
var name = "vega-lite";
var author = "Dominik Moritz, Kanit \"Ham\" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer";
var version = "4.2.0";
var collaborators = [
"Kanit Wongsuphasawat ()",
"Dominik Moritz ()",
"Arvind Satyanarayan ()",
"Jeffrey Heer ()"
];
etc...
At the address http://js/compiled/cljs-runtime/node_modules/vega-lite/build/vega-lite.js
Which is maybe derived from ./resources/public/js/compiled/cljs-runtime/module\$node_modules\$vega_lite\$build\$vega_lite.js
(which states the version as 4.2.0)
I grepped the project, and this is the only vega-lite + 4.2.0 mention I found.
Also, an error message says that the version running is 4.2.0.
I wonder what may cause it.it wouldn't be the first time that package.json contains a different version than some constant in the code
sometimes the cache seems to get confused and miss an update if too many files change
<project>/node_modules/vega-lite
assuming you didn't overwrite any path related stuff in your config
Restarting didn't work, Hmm, I checked the actual file <project>/node_modules/vega-lite/build/vega-lite.js and it has version 4.9.0. Made sure I'm in the right folder.. Maybe the shadow-cljs.edn config can help?
{:lein true
:nrepl {:port 8777}
:builds {
:app {:target :browser
:output-dir "resources/public/js/compiled"
:asset-path "/js/compiled"
:modules {:app {:init-fn crystal-web-client.core/init
:preloads [devtools.preload
day8.re-frame-10x.preload]}}
:dev {:compiler-options {:closure-defines {re-frame.trace.trace-enabled? true
day8.re-frame.tracing.trace-enabled? true}}}
:devtools {:http-root "resources/public"
:http-port 8280}
}