danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.81k stars 119 forks source link

Error: Glob should match exactly 2 files but matched 3 build/static/js/*.js #210

Open FezVrasta opened 3 years ago

FezVrasta commented 3 years ago

Description When I run source-map-explorer 'build/static/js/*.js' I get the following error:

Error: Glob should match exactly 2 files but matched 3 build/static/js/*.js

Steps to reproduce

  1. source-map-explorer 'build/static/js/*.js'

Files to reproduce I'm using a Create React App (v4) with Craco in order to enable Craco ITK plugin (craco-itk).

Expected behavior I would expect the tool to work.

Environment

Additional context

I'm not sure what the error is referring too, I don't see any documentation where it's explained what kind of files should the tool consume.

nikolay-borzov commented 3 years ago

I expect more details. Provide the list of files inside build/static/js/

FezVrasta commented 3 years ago

This is the list of the files

CleanShot 2021-07-27 at 17 10 19@2x

nikolay-borzov commented 3 years ago

I see a problem with .LICENSE.txt file. For now, you need to use a glob that only matches .js and .js.map files. The issue is noted

FezVrasta commented 3 years ago

I'm sorry, isn't my glob already doing that?

FezVrasta commented 3 years ago

Little update, I deleted the .txt file but I keep having the error.

nikolay-borzov commented 3 years ago

Have you tried omitting single quotes?

source-map-explorer build/static/js/*.js
FezVrasta commented 3 years ago
~/P/S/s/frontend ❯❯❯ source-map-explorer build/static/js/*.js                                                   
Usage:
  source-map-explorer <script.js> [<script.js.map>]
  source-map-explorer [--json | --html | --tsv] [-m | --only-mapped] <script.js> [<script.js.map>] [--replace=BEFORE --with=AFTER]... [--noroot]
  source-map-explorer -h | --help | --version
nikolay-borzov commented 3 years ago

What terminal do you use? Try Git Bash

FezVrasta commented 3 years ago

I'm using zsh, but I get the same output with bash

bash-3.2$ source-map-explorer build/static/js/*.js
Usage:
  source-map-explorer <script.js> [<script.js.map>]
  source-map-explorer [--json | --html | --tsv] [-m | --only-mapped] <script.js> [<script.js.map>] [--replace=BEFORE --with=AFTER]... [--noroot]
  source-map-explorer -h | --help | --version