Re-running watch on CLJS source using native modules results in JS error

Description

I'm trying to use a native NPM module in my CLJS code (in this case, date-fns), and the initial time I try to watch, it works, however on successive watches, it fails with the following error in my console:

To reproduce, I've created a build script as such:

as well as a minimal test file:

I'm also testing with a local `package.json` file rather than using `install_deps true` - my `package.json` (generated by CLJS) looks like this:

When I run:

everything works fine, however if I CTRL+C and run the same exact command again, I get the error outlined above.

However, if (and only if) I delete the `out` directory and run the command a third time, it works again.

Please let me know if you need any other details.

Environment

Mac OS X 10.13.1, ClojureScript 1.9.968-gebdaf6c0 running on Java SE 1.8.0_144, built with Maven 3.5.2

Assignee

Unassigned

Reporter

import

Labels

None

Approval

None

Patch

None

Affects versions

Priority

Minor
Configure