ClojureScript

Cannot import node_modules into ES6 classpath lib

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

For ClojureScript we have special parsing of :require to determine top-level Node dependencies, however this is not done for classpath lib files.

If both ClojureScript and ES6 classpath libs try to require a node_module we get the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: Duplicate module path after resolving: /Users/davidnolen/development/clojure/hello-es6/node_modules/react/react.js
	at com.google.javascript.jscomp.deps.ModuleLoader.resolvePaths(ModuleLoader.java:294)
	at com.google.javascript.jscomp.deps.ModuleLoader.<init>(ModuleLoader.java:96)
	at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1760)
	at com.google.javascript.jscomp.Compiler.parse(Compiler.java:994)

Activity

There are no comments yet on this issue.

People

Vote (2)
Watch (0)

Dates

  • Created:
    Updated: