Uploaded image for project: 'ClojureScript'
  1. CLJS-2720

Cannot import node_modules into ES6 classpath lib

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: 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)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dnolen David Nolen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: