I'm working with a package that has an alternate way to install for its "nightly" build. I've cloned the package repo to my local drive and built the package (actually it builds multiple packages but in my example I'm only using one.) The local repo serves up the package via a http interface using a simple Python server. I can then install the package using npm install
with the dependency in my project package.json file of `"@ndn/packet": "http://localhost:8000/packet.tgz"`. The package installs properly but fails when I run shadow-cljs to compile. I have tested using this package with webpack and node.js so I am confident that the Javascript stuff is working properly. Is there something I need to do with shadow-cljs to get this to work?
The compile fails with the following error:
(parallels) (27)# shadow-cljs compile app
shadow-cljs - config: /media/psf/DataPartition/lastmile/ttncore/shadow-cljs.edn
[:app] Compiling ...
npm package "@ndn/packet" expected version "@ndn/tlv@http://localhost:8000/tlv.tgz" but "0.0.20201213-nightly-eb9e062" is installed.
[:app] Build completed. (225 files, 6 compiled, 0 warnings, 11.57s)
npm ls
reports the following:
(parallels) (28)# npm ls | more
ttncore@0.0.1 /media/psf/DataPartition/lastmile/ttncore
├─┬ @babel/runtime@7.12.5
│ └── regenerator-runtime@0.13.7
├─┬ @ndn/packet@0.0.20201213-nightly-eb9e062
│ ├─┬ @ndn/tlv@0.0.20201213-nightly-eb9e062
And here's a snippet from my package.json file:
"dependencies": {
"@babel/runtime": "^7.12.5",
"@ndn/packet": "<http://localhost:8000/packet.tgz>",
@dmaltbie [:app] Build completed. (225 files, 6 compiled, 0 warnings, 11.57s)
the build succeeded? the "expected version" thing is just a warning?
into shadow-cljs.edn
at the top level
you must have a deps.cljs files somewhere. its the only file that causes those warnings. it might be in one of the cljsjs dependencies though so if the warning goes away after removing them its probably one of those
I expect this is my bonehead problem, but I can't get the :npm-deps option to work. I've tried several ways with no success. I even tried it in a deps.cljs file in the src directory. Can you please look at my shadow-cljs.edn file and tell me what I'm doing wrong? You'll see I've tried it in various places in the .edn file just to see if I misplaced it. No luck.
Also, I've searched for the deps.cljs file but I'm not finding one. (used find
starting from root and grep
to search the source tree).
Thanks.
at the top level the one is just fine. are you maybe on an old version that doesn't have this flag?
Here's what I've got:
(parallels) (157)# shadow-cljs info
shadow-cljs - config: /media/psf/DataPartition/lastmile/ttncore/shadow-cljs.edn
=== Version
jar: 2.11.11
cli: 2.11.11
deps: 1.3.2
config-version: 2.11.11
=== Java
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
Also in my package.json I have (is this necessary?):
"devDependencies": {
"onchange": "^7.1.0",
"shadow-cljs": "^2.11.11",
"tailwindcss": "^1.9.6"
},
looks fine to me. I don't know what is up with your setup but again you can ignore the warning. it has no impact on the build whatsoever.
Ok. Thanks for your help.
Just curious, is there is a way to examine the option settings for a given runtime of the compiler?
not sure I understand the question? which "runtime" are you talking about abnd which settings?
hey, I just released version 2.11.12
which should get rid of the warning you asked about. it doesn't compare versions using http: etc anymore
in addition there is a :js-options {:check-versions false}
to turn the check off completely (true by default)
That worked for me!! Thanks. I really appreciate being able to weed out the extraneous warnings so that I can see any others with less clutter. Big Thumbs Up!