添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description
I'm working on [email protected] and I got this error.

$ source-map-explorer build/static/js/*.js
build/static/js/2.9d3308cf.chunk.js
  Unable to map 86/5098426 bytes (0.00%)
build/static/js/main.b235dfa8.chunk.js
  Unable to map 77/248845 bytes (0.03%)
build/static/js/runtime~main.a8a9905a.js
  Unable to map 13/1502 bytes (0.87%)
Unable to open web browser. Invalid switch - "/tmp".
Either run with --html, --json, --tsv, --file, or view HTML for the visualization at:
/tmp/sme-result-2020113-220-1f3lsmg.3b1gf.html

Steps to reproduce

  • Build your create-react-app with npm run build
  • run $ source-map-explorer build/static/js/*.js
  • See error
  • Expected behavior
    It should open the web browser and show the visualization.

    Environment

  • OS: Microsoft Windows [Version 10.0.17763.805]
  • Terminal WSL 1
  • Distributor ID: Ubuntu
    Description:    Ubuntu 16.04.6 LTS
    Release:        16.04
    
  • source-map-explorer Version [2.1.2]
  • Additional context
    I can still see the /tmp/sme-result-2020113-220-1f3lsmg.3b1gf.html generated. I can still also put --html params and it will generate the file alright. I'm just wondering how to get the proper/expected behaviour if I am using WSL.

    Couldn't test with [email protected] because it's too slow.

    I tried with [email protected]

    $ source-map-explorer build/static/js/*.js
    build/static/js/2.9d3308cf.chunk.js
      Unable to map 130/5098425 bytes (0.00%)
    build/static/js/main.b235dfa8.chunk.js
      Unable to map 124/248844 bytes (0.05%)
    build/static/js/runtime~main.a8a9905a.js
      1. Your source map only contains one source (../webpack/bootstrap).
      This can happen if you use browserify+uglifyjs, for example, and don't set the --in-source-map flag to uglify.
      See https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-maps
      2. Unable to map 62/1501 bytes (4.13%)
    Unable to open web browser. Invalid switch - "/tmp".
    Either run with --html, --json, --tsv, --file, or view HTML for the visualization at:
    /tmp/sme-result-2020113-146-119t6vf.v2pk.html
    
  • $ source-map-explorer build/static/js/*.js --html ./some-file-name.html and manually open the some-file-name.html
  • Or use MINGW64 terminal on Windows
  • If anyone can have a better solution, kindly leave a comment below.