Fork me on GitHub
#cljs-dev
<
2017-12-12
>
koz15:12:24

Hello, I’ve run into an issue when trying to use a native NPM module (date-fns) with CLJS 1.9.946. I’ve tried to set up a simple repo (https://github.com/dkozma/npm-issue) that tries to reproduce this using just a base lein figwheel template. Essentially, when I run lein figwheel initially, everything works, however if I quit out of the process, then run lein figwheel again, I get an error saying Undefined nameToPath for date_fns, and I have to lein clean before running lein figwheel again for it to work. Is this a known issue or should I submit this to the CLJS issue queue?

dnolen15:12:44

you should try to reproduce the problem without Figwheel if you want to report something

koz15:12:46

@dnolen Here is the test case using mies as a base: https://github.com/dkozma/npm-issue-min

mfikes16:12:13

@koz Recommend filing an issue in JIRA without using any downstream tooling or links to repos. See https://clojurescript.org/community/reporting-issues

juhoteperi16:12:54

Phew, I think I finally got JS Module information out of new Closure, it required reflection to create one class but maybe I can find another way now that I got this working (@anmonteiro)

dnolen16:12:41

@koz as @mfikes said, reporting ClojureScript issues means no tooling but ClojureScript itself

dnolen16:12:53

about the only thing we would accept that’s higher level is the new clj tool

dnolen16:12:04

you can get that via brew install clojure

koz16:12:46

OK, I’ve never imported NPM modules without using any tooling whatsoever so I’ll have to look into how to make a reproducible test case doing that and will create an issue if I succeed

dnolen17:12:35

most tooling is just a layer over ClojureScript compiler options

dnolen17:12:46

if you haven’t read through the Quick Start, now would be a good time

koz17:12:27

Yes working on it now

koz17:12:12

Was able to repro using CLJS directly, creating an issue now @dnolen

dnolen17:12:22

great thanks

koz17:12:45

@dnolen Added https://dev.clojure.org/jira/browse/CLJS-2440 - unfortunately I messed up on the title and don’t seem to have any edit permissions, so I put the correct title as a comment.

juhoteperi17:12:43

@koz What Node/npm versions you you have?

koz17:12:58

% npm -v 5.5.1
% node -v v8.4.0

koz17:12:12

(will add these to the ticket)