Fork me on GitHub
#shadow-cljs
<
2021-05-15
>
yalu07:05:50

I tried forcing version 2.0.2 of readable-stream as suggested in SO solution but get another error after that transpilation of BigInt is not supported

yalu07:05:15

Thank you for any help unraveling this mystery

thheller07:05:57

try :compiler-options {:output-feature-set :es2018} in your build config. maybe :es2019 or :es2020. not sure which language level bigints were

yalu07:05:07

Cool thank you that make sense I will give it a go

yalu08:05:17

Seems it was in :es2020 but still no dice 😞 I get failed to convert sources on a whole bunch of libraries

thheller08:05:44

I cannot guess the errors you get sorry

thheller08:05:47

:ex-next-in is the highest level possible, maybe that works

yalu08:05:04

ooohh that might js-waku is written in typeScript with compiler option esnext

thheller08:05:19

that isn't relevant, js config options don't apply to closure compiler options

yalu08:05:14

still that did not work same failed to convert sources error

npx shadow-cljs watch frontend
shadow-cljs - config: /Users/yalu/Projects/nemonymous/shadow-cljs.edn
shadow-cljs - HTTP server available at 
shadow-cljs - server version: 2.13.0 running at 
shadow-cljs - nREPL server started on port 50869
shadow-cljs - watching build :frontend
[:frontend] Configuring build.
[:frontend] Compiling ...
[:frontend] Build failure:
failed to convert sources
{:tag :shadow.build.closure/convert-error, :sources [[:shadow.build.npm/resource "node_modules/object-assign/index.js"] [:shadow.build.npm/resource "node_modules/react/cjs/react.production.min.js"] [:shadow.build.npm/resource "node_modules/react/cjs/react.development.js"] [:shadow.build.npm/resource "node_modules/react/index.js"] .............................................

thheller08:05:51

don't shorten errors ... you cut out the reason why it failed

yalu08:05:24

It was too big to fit.. so attaching file of log

thheller08:05:18

RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.

null
  Node(SHEQ): node_modules/bcrypto/lib/native/bn.js:3605:6
  if ((y & 1n) === 0n)
  Parent(IF): node_modules/bcrypto/lib/native/bn.js:3605:2
  if ((y & 1n) === 0n)

thheller08:05:46

this is a closure-compiler error, it appears that it doesn't support the code

yalu08:05:34

Thank you for the prompt response and incredible patience 🙏 I will give webpack a go

thheller08:05:01

are you sure this code is supposed to be supported in the browser? I see a bunch of node specific stuff so it looks like a node thing to me?

yalu08:05:39

I am pretty sure it is supposed to be supported in the browser https://www.npmjs.com/package/js-waku

thheller08:05:11

hmm yeah seems rather cutting edge

yalu08:05:15

yeah.. freshly released.. hardly battle tested.. I'm also communicating with the dev.. so let's see I'm going to try everything I can