question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source Maps Resolved relative to SourceFile path (which may not be a valid path).

See original GitHub issue
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 44: StreamableResource%3Ctext/javascript webjars:META-INF/resources/webjars/eddyson-react-grid/0.8.6/dist/Ardagryd.min.js COMPRESSABLE lastModified: Do Aug 10 09:02:01 MESZ 2017 size: 60696%3E
--
at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPath.parse(Unknown Source)
at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
at com.google.javascript.jscomp.SourceMapResolver.getRelativePath(SourceMapResolver.java:73)
at com.google.javascript.jscomp.SourceMapResolver.extractSourceMap(SourceMapResolver.java:53)
at com.google.javascript.jscomp.JsAst.parse(JsAst.java:163)
at com.google.javascript.jscomp.JsAst.getAstRoot(JsAst.java:54)
at com.google.javascript.jscomp.CompilerInput.getAstRoot(CompilerInput.java:121)
at com.google.javascript.jscomp.Compiler.hoistIfExtern(Compiler.java:1974)
at com.google.javascript.jscomp.Compiler.hoistUnorderedExterns(Compiler.java:1944)
at com.google.javascript.jscomp.Compiler.orderInputs(Compiler.java:1895)
at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1826)
at com.google.javascript.jscomp.Compiler.parseForCompilationInternal(Compiler.java:994)
at com.google.javascript.jscomp.Compiler.access$300(Compiler.java:102)
at com.google.javascript.jscomp.Compiler$6.call(Compiler.java:974)
at com.google.javascript.jscomp.Compiler$6.call(Compiler.java:971)
at com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread(CompilerExecutor.java:118)
at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:872)
at com.google.javascript.jscomp.Compiler.parseForCompilation(Compiler.java:970)
at com.google.javascript.jscomp.Compiler.compile(Compiler.java:723)

Maybe the InvalidPathException should be caught.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
chancykcommented, Nov 20, 2017

Is this related to the exception below? I’m getting this from the release.clj build script in the ClojureScript quick-start tutorial under the Production Builds section, which reads:

(require 'cljs.build.api)

(cljs.build.api/build "src"
  {:output-to "out/main.js"
   :optimizations :advanced})

(System/exit 0)
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Projects/cljs/out/cljs/core.js, compiling:(C:\Projects\cljs\release.clj:3:1)
        at clojure.lang.Compiler.load(Compiler.java:7391)
        at clojure.lang.Compiler.loadFile(Compiler.java:7317)
        at clojure.main$load_script.invokeStatic(main.clj:275)
        at clojure.main$script_opt.invokeStatic(main.clj:335)
        at clojure.main$script_opt.invoke(main.clj:330)
        at clojure.main$main.invokeStatic(main.clj:421)
        at clojure.main$main.doInvoke(main.clj:384)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:379)
        at clojure.lang.AFn.applyToHelper(AFn.java:154)
        at clojure.lang.Var.applyTo(Var.java:700)
        at clojure.main.main(main.java:37)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Projects/cljs/out/cljs/core.js
        at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
        at sun.nio.fs.WindowsPath.parse(Unknown Source)
        at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
        at com.google.javascript.jscomp.SourceMapResolver.getRelativePath(SourceMapResolver.java:73)
        at com.google.javascript.jscomp.SourceMapResolver.extractSourceMap(SourceMapResolver.java:53)
        at com.google.javascript.jscomp.JsAst.parse(JsAst.java:168)
        at com.google.javascript.jscomp.JsAst.getAstRoot(JsAst.java:55)
        at com.google.javascript.jscomp.CompilerInput.getAstRoot(CompilerInput.java:122)
        at com.google.javascript.jscomp.Compiler.hoistNoCompileFiles(Compiler.java:1992)
        at com.google.javascript.jscomp.Compiler.orderInputs(Compiler.java:1890)
        at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1793)
        at com.google.javascript.jscomp.Compiler.parseForCompilationInternal(Compiler.java:982)
        at com.google.javascript.jscomp.Compiler.access$300(Compiler.java:102)
        at com.google.javascript.jscomp.Compiler$6.call(Compiler.java:964)
        at com.google.javascript.jscomp.Compiler$6.call(Compiler.java:961)
        at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:101)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
2reactions
tadeegancommented, Aug 17, 2017

This is still a bug. Sources that don’t come from a filesystem should not try to find the file from the sourcemap annotation. Or at least there should be a better error here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source map is absolute path but Chrome DevTool assumes ...
Right-click on a source-mapped less file in the Sources panel, then select 'Map to File System Resource...'. Select the less source file on...
Read more >
Troubleshooting Source Maps for JavaScript
This can either be a fully qualified URL, a relative path, or the filename itself. When uploading artifacts to Sentry, you must name...
Read more >
Source Maps — raven-js 3.4.0 documentation
So for example, if your sourcemap reference is just a relative path, it's relative to the location of the referencing file. So for...
Read more >
Debug Node.js Apps using Visual Studio Code
There are a few ways you can debug your Node.js programs in VS Code: Use auto attach to debug ... Relative paths are...
Read more >
Debug Angular apps in production without revealing source ...
At its core, a source map is a JSON file that contains all the ... relative from here; sources: the path to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found