This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-16
Channels
- # beginners (115)
- # boot (13)
- # boot-dev (13)
- # chestnut (1)
- # cider (1)
- # clara (10)
- # cljs-dev (21)
- # cljsjs (1)
- # cljsrn (2)
- # clojure (120)
- # clojure-dusseldorf (2)
- # clojure-greece (13)
- # clojure-ireland (1)
- # clojure-italy (3)
- # clojure-nlp (3)
- # clojure-russia (2)
- # clojure-spec (13)
- # clojure-uk (82)
- # clojured (5)
- # clojurescript (47)
- # core-async (2)
- # core-logic (8)
- # cursive (45)
- # datomic (2)
- # editors (1)
- # emacs (39)
- # fulcro (166)
- # graphql (1)
- # hoplon (16)
- # keechma (5)
- # off-topic (202)
- # perun (4)
- # protorepl (7)
- # re-frame (28)
- # reagent (13)
- # ring (27)
- # ring-swagger (16)
- # rum (1)
- # shadow-cljs (25)
- # spacemacs (20)
- # sql (141)
- # yada (4)
Hi. I'm trying to use shadow-cljs along with Macchiato. However, I'm getting the following error when running the file produced by shadow-cljs -
SHADOW import error /projects/funnels-cljs/target/shadow-cljs/builds/server/dev/out/cljs-runtime/macchiato.crypto.js
/projects/funnels-cljs/node_modules/source-map/lib/source-map-consumer.js:539
throw new TypeError('Line must be greater than or equal to 1, got '
^
TypeError: Line must be greater than or equal to 1, got null
I'm not sure if I'm doing anything wrong, because I have very limited experience with nodejs.$ /projects/funnels-cljs$ node out/funnels-cljs/server.js
SHADOW import error /projects/funnels-cljs/target/shadow-cljs/builds/server/dev/out/cljs-runtime/macchiato.crypto.js
/projects/funnels-cljs/node_modules/source-map/lib/source-map-consumer.js:539
throw new TypeError('Line must be greater than or equal to 1, got '
^
TypeError: Line must be greater than or equal to 1, got null
at BasicSourceMapConsumer.SourceMapConsumer_findMapping [as _findMapping] (/projects/funnels-cljs/node_modules/source-map/lib/source-map-consumer.js:539:13)
at BasicSourceMapConsumer.SourceMapConsumer_originalPositionFor [as originalPositionFor] (/projects/funnels-cljs/node_modules/source-map/lib/source-map-consumer.js:604:22)
at mapSourcePosition (/projects/funnels-cljs/node_modules/source-map-support/source-map-support.js:199:42)
at wrapCallSite (/projects/funnels-cljs/node_modules/source-map-support/source-map-support.js:343:20)
at /projects/funnels-cljs/node_modules/source-map-support/source-map-support.js:378:26
at Array.map (<anonymous>)
at Function.prepareStackTrace (/projects/funnels-cljs/node_modules/source-map-support/source-map-support.js:377:24)
at process.emit (/projects/funnels-cljs/node_modules/source-map-support/source-map-support.js:431:52)
at process._fatalException (bootstrap_node.js:386:26)
This is basically just from taking the Macchiato lein project template, and then adding a shadow-cljs.edn file and trying to run it that way.
Will do, give me a few minutes.
I usually already remove the lineCount
property from source maps, looks like I forgot to do that somewhere
/projects/funnels-cljs/target/shadow-cljs/builds/server/dev/out/cljs-runtime/macchiato.crypto.js.map
probably has "lineCount":null
which it shouldn’t
Thanks, appreciate the help!
It is working now, was just a few missing npm dependencies.
gah .. the source-map-support
package for node is just one piece of horrible ugly code
@mjmeintjes should be safe to enable source maps with [email protected]
again, was using incorrect offsets so source maps got confused.