Is there a more elegant way to force REcompiling all files while watching? Rather than purging the compilation cache and restarting? (Need to do some side effects via macro, hence recompiling files even if they didn't change)
I am trying to follow https://developers.google.com/web/fundamentals/primers/service-workers and service workers seem to require two .js
files, is there a way for shadow-cljs to automatically build both these files while watching?
@adam678 you can use :cache-blockers
or :dev/always
(see docs) in combination with (shadow.cljs.devtools.api/watch-compile-all!)
from the REPL
but in general you should avoid side effects in macros as much as possible
maybe :build-hooks
let you do what you need in a cleaner way
@archibald.pontier_clo you can either use :modules
or two separate builds and shadow-cljs watch build-a build-b
but in general CLJS isn't a great fit for building service workers, separate tools like https://developers.google.com/web/tools/workbox get it done much smaller and simlper
Thank you
Another simple solution I eventually found is having a macro which takes a path and recursively touches all files from there, hence triggering recompilation.
macros are a terrible way to do this kind of stuff
Yeah, I am experimenting with some esoteric stuff which compile CSS to files without needing a server (some CLJC magic). Not sure if it's really worth it, but it does the job actually...
I having been working on a Clojurescript project for some time now but this is my first serious project. I've been keeping little snippets of code for unit testing within the source files and using repl to test. I thought I would take this as an opportunity to use the shadow-cljs test capabilities (I've been using lein test for the Java version of my code for several months without issue). I got a basic framework running with a simple dummy test file which works. But when I add some of the libraries I'm using I get an error that a dependent library file is missing. I have no issues when I compile my app using these libraries but when I compile my test code it fails. I'm using shadow-cljs 2.11.14.
Here's the error:
`The required JS dependency "readable-stream/writable.js" is not available, it was required by "node_modules/stream-browserify/index.js".
Dependency Trace:
ttncore/some_test.cljs
node_modules/@ndn/repo/lib/mod_node.js
node_modules/@ndn/repo-api/lib/mod_node.js
node_modules/@ndn/repo-api/lib/bulk-insert-initiator_node.js
node_modules/@ndn/repo-api/lib/data-store_node.js
node_modules/@ndn/packet/lib/mod_node.js
node_modules/@ndn/packet/lib/security/signed-interest-policy_node.js
node_modules/@ndn/packet/lib/interest_node.js
node_modules/@ndn/packet/lib/security/helper_node.js
node_modules/crypto-browserify/index.js
node_modules/create-hash/browser.js
node_modules/cipher-base/index.js
node_modules/stream-browserify/index.js
Searched for npm packages in:
/media/psf/DataPartition/lastmile/ttncore/node_modules
Here are the modules I have installed:
(parallels) parallels (98)# npm list
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
│ │ └── tslib@2.0.3 deduped
│ ├── buffer-compare@1.1.1
│ ├── minimalistic-assert@1.0.1
│ ├─┬ mnemonist@0.38.1
│ │ └── obliterator@1.6.1
│ └── tslib@2.0.3
├─┬ @ndn/repo@0.0.20201213-nightly-eb9e062
│ ├─┬ @ndn/endpoint@0.0.20201213-nightly-eb9e062
│ │ ├── @ndn/fw@0.0.20201213-nightly-eb9e062 deduped
│ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ │ ├─┬ abort-controller@3.0.0
│ │ │ └── event-target-shim@5.0.1
│ │ ├── applymixins@1.1.0
│ │ ├─┬ it-pushable@1.4.0
│ │ │ └── fast-fifo@1.0.0
│ │ ├── minimalistic-assert@1.0.1 deduped
│ │ ├── streaming-iterables@5.0.3 deduped
│ │ └── tslib@2.0.3 deduped
│ ├─┬ @ndn/fw@0.0.20201213-nightly-eb9e062
│ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ │ ├── @types/retry@0.12.0
│ │ ├── hirestime@6.1.0
│ │ ├── it-pushable@1.4.0 deduped
│ │ ├── loglevel@1.7.1
│ │ ├── minimalistic-assert@1.0.1 deduped
│ │ ├── mnemonist@0.38.1 deduped
│ │ ├── p-defer@3.0.0
│ │ ├─┬ p-fifo@1.0.0
│ │ │ ├── fast-fifo@1.0.0 deduped
│ │ │ └── p-defer@3.0.0 deduped
│ │ ├── retry@0.12.0
│ │ ├── streaming-iterables@5.0.3 deduped
│ │ ├── tslib@2.0.3 deduped
│ │ └── typed-emitter@1.3.1 deduped
│ ├─┬ @ndn/l3face@0.0.20201213-nightly-eb9e062
│ │ ├── @ndn/fw@0.0.20201213-nightly-eb9e062 deduped
│ │ ├─┬ @ndn/lp@0.0.20201213-nightly-eb9e062
│ │ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├─┬ it-keepalive@1.2.0
│ │ │ │ └── get-iterator@1.0.2
│ │ │ └── tslib@2.0.3 deduped
│ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ │ ├── it-pushable@1.4.0 deduped
│ │ ├── streaming-iterables@5.0.3 deduped
│ │ ├── tslib@2.0.3 deduped
│ │ └── typed-emitter@1.3.1 deduped
│ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ ├─┬ @ndn/repo-api@0.0.20201213-nightly-eb9e062
│ │ ├── @ndn/l3face@0.0.20201213-nightly-eb9e062 deduped
│ │ ├─┬ @ndn/naming-convention2@0.0.20201213-nightly-eb9e062
│ │ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ │ │ └── tslib@2.0.3 deduped
│ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ ├─┬ @ndn/rdr@0.0.20201213-nightly-eb9e062
│ │ │ ├── @ndn/endpoint@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├── @ndn/naming-convention2@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├── @ndn/packet@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ │ │ ├── abort-controller@3.0.0 deduped
│ │ │ └── tslib@2.0.3 deduped
│ │ ├─┬ duplexify@4.1.1
│ │ │ ├─┬ end-of-stream@1.4.4
│ │ │ │ └── once@1.4.0 deduped
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ ├─┬ readable-stream@3.6.0
│ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ ├── string_decoder@1.3.0 deduped
│ │ │ │ └── util-deprecate@1.0.2 deduped
│ │ │ └── stream-shift@1.0.1
│ │ ├── graceful-fs@4.2.4
│ │ ├── is-stream@2.0.0
│ │ ├── it-pushable@1.4.0 deduped
│ │ ├── p-defer@3.0.0 deduped
│ │ ├── streaming-iterables@5.0.3 deduped
│ │ ├── throat@5.0.0 deduped
│ │ └── tslib@2.0.3 deduped
│ ├── @ndn/tlv@0.0.20201213-nightly-eb9e062 deduped
│ ├── @types/abstract-leveldown@5.0.1
│ ├─┬ abstract-leveldown@6.3.0
│ │ ├─┬ buffer@5.7.1
│ │ │ ├── base64-js@1.5.1 deduped
│ │ │ └── ieee754@1.2.1 deduped
│ │ ├── immediate@3.2.3 deduped
│ │ ├── level-concat-iterator@2.0.1
│ │ ├─┬ level-supports@1.0.1
│ │ │ └── xtend@4.0.2 deduped
│ │ └── xtend@4.0.2
│ ├─┬ encoding-down@6.3.0
│ │ ├── abstract-leveldown@6.2.3 deduped
│ │ ├── inherits@2.0.4 deduped
│ │ ├─┬ level-codec@9.0.2
│ │ │ └─┬ buffer@5.7.1
│ │ │ ├── base64-js@1.5.1 deduped
│ │ │ └── ieee754@1.2.1 deduped
│ │ └─┬ level-errors@2.0.1
│ │ └─┬ errno@0.1.8
│ │ └── prr@1.0.1
│ ├─┬ levelup@4.4.0
│ │ ├─┬ deferred-leveldown@5.3.0
│ │ │ ├── abstract-leveldown@6.2.3 deduped
│ │ │ └── inherits@2.0.4 deduped
│ │ ├── level-errors@2.0.1 deduped
│ │ ├─┬ level-iterator-stream@4.0.2
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ ├── readable-stream@3.6.0 deduped
│ │ │ └── xtend@4.0.2 deduped
│ │ ├── level-supports@1.0.1 deduped
│ │ └── xtend@4.0.2 deduped
│ ├── minimalistic-assert@1.0.1 deduped
│ ├── streaming-iterables@5.0.3
│ ├── throat@5.0.0
│ ├── tslib@2.0.3 deduped
│ └── typed-emitter@1.3.1
├─┬ bs58@4.0.1
│ └─┬ base-x@3.0.8
│ └── safe-buffer@5.2.1 deduped
├─┬ buffer@6.0.3
│ ├── base64-js@1.5.1
│ └── ieee754@1.2.1
├─┬ memdown@5.1.0
│ ├─┬ abstract-leveldown@6.2.3
│ │ ├─┬ buffer@5.7.1
│ │ │ ├── base64-js@1.5.1 deduped
│ │ │ └── ieee754@1.2.1 deduped
│ │ ├── immediate@3.2.3 deduped
│ │ ├── level-concat-iterator@2.0.1 deduped
│ │ ├── level-supports@1.0.1 deduped
│ │ └── xtend@4.0.2 deduped
│ ├── functional-red-black-tree@1.0.1
│ ├── immediate@3.2.3
│ ├── inherits@2.0.4
│ ├── ltgt@2.2.1
│ └── safe-buffer@5.2.1
├─┬ msgpack-lite@0.1.26
│ ├── event-lite@0.1.2
│ ├── ieee754@1.2.1 deduped
│ ├── int64-buffer@0.1.10
│ └── isarray@1.0.0
├─┬ onchange@7.1.0
│ ├── @blakeembrey/deque@1.0.5
│ ├── @blakeembrey/template@1.0.0
│ ├── arg@4.1.3
│ ├─┬ chokidar@3.4.3
│ │ ├─┬ anymatch@3.1.1
│ │ │ ├── normalize-path@3.0.0 deduped
│ │ │ └── picomatch@2.2.2
│ │ ├─┬ braces@3.0.2
│ │ │ └─┬ fill-range@7.0.1
│ │ │ └─┬ to-regex-range@5.0.1
│ │ │ └── is-number@7.0.0
│ │ ├── UNMET OPTIONAL DEPENDENCY fsevents@2.1.3
│ │ ├─┬ glob-parent@5.1.1
│ │ │ └── is-glob@4.0.1 deduped
│ │ ├─┬ is-binary-path@2.1.0
│ │ │ └── binary-extensions@2.1.0
│ │ ├─┬ is-glob@4.0.1
│ │ │ └── is-extglob@2.1.1
│ │ ├── normalize-path@3.0.0
│ │ └─┬ readdirp@3.5.0
│ │ └── picomatch@2.2.2 deduped
│ ├─┬ cross-spawn@7.0.3
│ │ ├── path-key@3.1.1
│ │ ├─┬ shebang-command@2.0.0
│ │ │ └── shebang-regex@3.0.0
│ │ └─┬ which@2.0.2
│ │ └── isexe@2.0.0 deduped
│ ├── ignore@5.1.8
│ └── tree-kill@1.2.2
├─┬ react@16.14.0
│ ├─┬ loose-envify@1.4.0
│ │ └── js-tokens@4.0.0
│ ├── object-assign@4.1.1
│ └─┬ prop-types@15.7.2
│ ├── loose-envify@1.4.0 deduped
│ ├── object-assign@4.1.1 deduped
│ └── react-is@16.13.1
├─┬ react-dom@16.14.0
│ ├── loose-envify@1.4.0 deduped
│ ├── object-assign@4.1.1 deduped
│ ├── prop-types@15.7.2 deduped
│ └─┬ scheduler@0.19.1
│ ├── loose-envify@1.4.0 deduped
│ └── object-assign@4.1.1 deduped
├─┬ shadow-cljs@2.11.14
│ ├─┬ node-libs-browser@2.2.1
│ │ ├─┬ assert@1.5.0
│ │ │ ├── object-assign@4.1.1 deduped
│ │ │ └─┬ util@0.10.3
│ │ │ └── inherits@2.0.1
│ │ ├─┬ browserify-zlib@0.2.0
│ │ │ └── pako@1.0.11
│ │ ├─┬ buffer@4.9.2
│ │ │ ├── base64-js@1.5.1 deduped
│ │ │ ├── ieee754@1.2.1 deduped
│ │ │ └── isarray@1.0.0 deduped
│ │ ├── console-browserify@1.2.0
│ │ ├── constants-browserify@1.0.0
│ │ ├─┬ crypto-browserify@3.12.0
│ │ │ ├─┬ browserify-cipher@1.0.1
│ │ │ │ ├─┬ browserify-aes@1.2.0
│ │ │ │ │ ├── buffer-xor@1.0.3
│ │ │ │ │ ├── cipher-base@1.0.4 deduped
│ │ │ │ │ ├── create-hash@1.2.0 deduped
│ │ │ │ │ ├── evp_bytestokey@1.0.3 deduped
│ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ │ ├─┬ browserify-des@1.0.2
│ │ │ │ │ ├── cipher-base@1.0.4 deduped
│ │ │ │ │ ├─┬ des.js@1.0.1
│ │ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ │ └── minimalistic-assert@1.0.1 deduped
│ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ │ └─┬ evp_bytestokey@1.0.3
│ │ │ │ ├── md5.js@1.3.5 deduped
│ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ ├─┬ browserify-sign@4.2.1
│ │ │ │ ├── bn.js@5.1.3
│ │ │ │ ├─┬ browserify-rsa@4.1.0
│ │ │ │ │ ├── bn.js@5.1.3 deduped
│ │ │ │ │ └── randombytes@2.1.0 deduped
│ │ │ │ ├── create-hash@1.2.0 deduped
│ │ │ │ ├── create-hmac@1.1.7 deduped
│ │ │ │ ├─┬ elliptic@6.5.3
│ │ │ │ │ ├── bn.js@4.11.9
│ │ │ │ │ ├── brorand@1.1.0
│ │ │ │ │ ├─┬ hash.js@1.1.7
│ │ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ │ └── minimalistic-assert@1.0.1 deduped
│ │ │ │ │ ├─┬ hmac-drbg@1.0.1
│ │ │ │ │ │ ├── hash.js@1.1.7 deduped
│ │ │ │ │ │ ├── minimalistic-assert@1.0.1 deduped
│ │ │ │ │ │ └── minimalistic-crypto-utils@1.0.1 deduped
│ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ ├── minimalistic-assert@1.0.1 deduped
│ │ │ │ │ └── minimalistic-crypto-utils@1.0.1
│ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ ├─┬ parse-asn1@5.1.6
│ │ │ │ │ ├─┬ asn1.js@5.4.1
│ │ │ │ │ │ ├── bn.js@4.11.9
│ │ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ │ ├── minimalistic-assert@1.0.1 deduped
│ │ │ │ │ │ └── safer-buffer@2.1.2
│ │ │ │ │ ├── browserify-aes@1.2.0 deduped
│ │ │ │ │ ├── evp_bytestokey@1.0.3 deduped
│ │ │ │ │ ├── pbkdf2@3.1.1 deduped
│ │ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ │ ├── readable-stream@3.6.0 deduped
│ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ ├─┬ create-ecdh@4.0.4
│ │ │ │ ├── bn.js@4.11.9
│ │ │ │ └── elliptic@6.5.3 deduped
│ │ │ ├─┬ create-hash@1.2.0
│ │ │ │ ├─┬ cipher-base@1.0.4
│ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ ├─┬ md5.js@1.3.5
│ │ │ │ │ ├─┬ hash-base@3.1.0
│ │ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ │ ├── readable-stream@3.6.0 deduped
│ │ │ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ │ ├─┬ ripemd160@2.0.2
│ │ │ │ │ ├── hash-base@3.1.0 deduped
│ │ │ │ │ └── inherits@2.0.4 deduped
│ │ │ │ └─┬ sha.js@2.4.11
│ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ ├─┬ create-hmac@1.1.7
│ │ │ │ ├── cipher-base@1.0.4 deduped
│ │ │ │ ├── create-hash@1.2.0 deduped
│ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ ├── ripemd160@2.0.2 deduped
│ │ │ │ ├── safe-buffer@5.2.1 deduped
│ │ │ │ └── sha.js@2.4.11 deduped
│ │ │ ├─┬ diffie-hellman@5.0.3
│ │ │ │ ├── bn.js@4.11.9
│ │ │ │ ├─┬ miller-rabin@4.0.1
│ │ │ │ │ ├── bn.js@4.11.9
│ │ │ │ │ └── brorand@1.1.0 deduped
│ │ │ │ └── randombytes@2.1.0 deduped
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ ├─┬ pbkdf2@3.1.1
│ │ │ │ ├── create-hash@1.2.0 deduped
│ │ │ │ ├── create-hmac@1.1.7 deduped
│ │ │ │ ├── ripemd160@2.0.2 deduped
│ │ │ │ ├── safe-buffer@5.2.1 deduped
│ │ │ │ └── sha.js@2.4.11 deduped
│ │ │ ├─┬ public-encrypt@4.0.3
│ │ │ │ ├── bn.js@4.11.9
│ │ │ │ ├── browserify-rsa@4.1.0 deduped
│ │ │ │ ├── create-hash@1.2.0 deduped
│ │ │ │ ├── parse-asn1@5.1.6 deduped
│ │ │ │ ├── randombytes@2.1.0 deduped
│ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ ├─┬ randombytes@2.1.0
│ │ │ │ └── safe-buffer@5.2.1 deduped
│ │ │ └─┬ randomfill@1.0.4
│ │ │ ├── randombytes@2.1.0 deduped
│ │ │ └── safe-buffer@5.2.1 deduped
│ │ ├── domain-browser@1.2.0
│ │ ├── events@3.2.0
│ │ ├── https-browserify@1.0.0
│ │ ├── os-browserify@0.3.0
│ │ ├── path-browserify@0.0.1
│ │ ├── process@0.11.10
│ │ ├── punycode@1.4.1
│ │ ├── querystring-es3@0.2.1
│ │ ├─┬ readable-stream@2.3.7
│ │ │ ├── core-util-is@1.0.2
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ ├── isarray@1.0.0 deduped
│ │ │ ├── process-nextick-args@2.0.1
│ │ │ ├── safe-buffer@5.1.2
│ │ │ ├─┬ string_decoder@1.1.1
│ │ │ │ └── safe-buffer@5.1.2 deduped
│ │ │ └── util-deprecate@1.0.2 deduped
│ │ ├─┬ stream-browserify@2.0.2
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ └─┬ readable-stream@2.3.7
│ │ │ ├── core-util-is@1.0.2 deduped
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ ├── isarray@1.0.0 deduped
│ │ │ ├── process-nextick-args@2.0.1 deduped
│ │ │ ├── safe-buffer@5.1.2
│ │ │ ├─┬ string_decoder@1.1.1
│ │ │ │ └── safe-buffer@5.1.2 deduped
│ │ │ └── util-deprecate@1.0.2 deduped
│ │ ├─┬ stream-http@2.8.3
│ │ │ ├── builtin-status-codes@3.0.0
│ │ │ ├── inherits@2.0.4 deduped
│ │ │ ├─┬ readable-stream@2.3.7
│ │ │ │ ├── core-util-is@1.0.2 deduped
│ │ │ │ ├── inherits@2.0.4 deduped
│ │ │ │ ├── isarray@1.0.0 deduped
│ │ │ │ ├── process-nextick-args@2.0.1 deduped
│ │ │ │ ├── safe-buffer@5.1.2
│ │ │ │ ├─┬ string_decoder@1.1.1
│ │ │ │ │ └── safe-buffer@5.1.2 deduped
│ │ │ │ └── util-deprecate@1.0.2 deduped
│ │ │ ├── to-arraybuffer@1.0.1
│ │ │ └── xtend@4.0.2 deduped
│ │ ├─┬ string_decoder@1.3.0
│ │ │ └── safe-buffer@5.2.1 deduped
│ │ ├─┬ timers-browserify@2.0.12
│ │ │ └── setimmediate@1.0.5
│ │ ├── tty-browserify@0.0.0
│ │ ├─┬ url@0.11.0
│ │ │ ├── punycode@1.3.2
│ │ │ └── querystring@0.2.0
│ │ ├─┬ util@0.11.1
│ │ │ └── inherits@2.0.3
│ │ └── vm-browserify@1.1.2
│ ├── readline-sync@1.4.10
│ ├── shadow-cljs-jar@1.3.2
│ ├─┬ source-map-support@0.4.18
│ │ └── source-map@0.5.7
│ ├─┬ which@1.3.1
│ │ └── isexe@2.0.0
│ └─┬ ws@3.3.3
│ ├── async-limiter@1.0.1
│ ├── safe-buffer@5.1.2
│ └── ultron@1.1.1
└─┬ tailwindcss@1.9.6
├─┬ @fullhuman/postcss-purgecss@2.3.0
│ ├─┬ postcss@7.0.32
│ │ ├─┬ chalk@2.4.2
│ │ │ ├── ansi-styles@3.2.1 deduped
│ │ │ ├── escape-string-regexp@1.0.5 deduped
│ │ │ └─┬ supports-color@5.5.0
│ │ │ └── has-flag@3.0.0 deduped
│ │ ├── source-map@0.6.1
│ │ └── supports-color@6.1.0 deduped
│ └─┬ purgecss@2.3.0
│ ├── commander@5.1.0
│ ├── glob@7.1.6 deduped
│ ├─┬ postcss@7.0.32
│ │ ├─┬ chalk@2.4.2
│ │ │ ├── ansi-styles@3.2.1 deduped
│ │ │ ├── escape-string-regexp@1.0.5 deduped
│ │ │ └─┬ supports-color@5.5.0
│ │ │ └── has-flag@3.0.0 deduped
│ │ ├── source-map@0.6.1
│ │ └── supports-color@6.1.0 deduped
│ └── postcss-selector-parser@6.0.4 deduped
├─┬ autoprefixer@9.8.6
│ ├── browserslist@4.16.0 deduped
│ ├── caniuse-lite@1.0.30001171
│ ├── colorette@1.2.1
│ ├── normalize-range@0.1.2
│ ├── num2fraction@1.2.2
│ ├── postcss@7.0.35 deduped
│ └── postcss-value-parser@4.1.0 deduped
├─┬ browserslist@4.16.0
│ ├── caniuse-lite@1.0.30001171 deduped
│ ├── colorette@1.2.1 deduped
│ ├── electron-to-chromium@1.3.633
│ ├── escalade@3.1.1
│ └── node-releases@1.1.67
├── bytes@3.1.0
├─┬ chalk@4.1.0
│ ├─┬ ansi-styles@4.3.0
│ │ └─┬ color-convert@2.0.1
│ │ └── color-name@1.1.4
│ └─┬ supports-color@7.2.0
│ └── has-flag@4.0.0
├─┬ color@3.1.3
│ ├─┬ color-convert@1.9.3
│ │ └── color-name@1.1.3
│ └─┬ color-string@1.5.4
│ ├── color-name@1.1.3 deduped
│ └─┬ simple-swizzle@0.2.2
│ └── is-arrayish@0.3.2
├─┬ detective@5.2.0
│ ├─┬ acorn-node@1.8.2
│ │ ├── acorn@7.4.1
│ │ ├── acorn-walk@7.2.0
│ │ └── xtend@4.0.2 deduped
│ ├── defined@1.0.0
│ └── minimist@1.2.5
├─┬ fs-extra@8.1.0
│ ├── graceful-fs@4.2.4 deduped
│ ├─┬ jsonfile@4.0.0
│ │ └── graceful-fs@4.2.4 deduped
│ └── universalify@0.1.2
├── html-tags@3.1.0
├─
@dmaltbie the above error is caused by not having shadow-cljs
installed in the project. hmm or not. seems to be in the list
I would personally recommend staying away from packages that use node specific packages in a browser build
what's the recommended way to upgrade to a new version of shadow-cljs
? Is this documented anywhere?
I don't have a choice for this library; it's one of a kind and provides key features. I've had problems with this library before, including at least two you have already helped me fix. It does some weird things in implementation but works for the most part. The method it uses to support common browser and node code is particularly problematic. When I've talked to the developer about this he says webpack works fine for him. Sigh. Is it possible for you to upgrade to the 3.x version of readable-stream and stream-browserify? Not sure if this would fix the problem but their release notes talk about changes that break with the older version and having something to do with supporting more recent browser JS engines.
either manually edit package.json
to pick the version you want and running npm install
after. or npm install shadow-cljs@2.11.15
directly
assuming you don't use project.clj or deps.edn
well you could just use webpack as well
the node-libs-browser packages are pretty much all deprecated and shouldn't be used
I'd rather not switch to webpack. I like shadow-cljs better. 😁 But isn't shadow-cljs using the node-libs-browser package? Or am I reading the dependency graph wrong?
it is yeah
you can try installing the newer version manually
just add it directly to your package.json, that might work. I don't have a clue. I don't use packages that use these 😛