source-map-explorer icon indicating copy to clipboard operation
source-map-explorer copied to clipboard

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

Open FezVrasta opened this issue 2 years ago • 9 comments

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

  • OS: macOS
  • source-map-explorer Version 2.5.2

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.

FezVrasta avatar Jul 23 '21 15:07 FezVrasta

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

nikolay-borzov avatar Jul 23 '21 21:07 nikolay-borzov

This is the list of the files

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

FezVrasta avatar Jul 27 '21 15:07 FezVrasta

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

nikolay-borzov avatar Jul 27 '21 18:07 nikolay-borzov

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

FezVrasta avatar Jul 27 '21 19:07 FezVrasta

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

FezVrasta avatar Jul 28 '21 15:07 FezVrasta

Have you tried omitting single quotes?

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

nikolay-borzov avatar Jul 28 '21 17:07 nikolay-borzov

~/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

FezVrasta avatar Jul 28 '21 17:07 FezVrasta

What terminal do you use? Try Git Bash

nikolay-borzov avatar Jul 28 '21 17:07 nikolay-borzov

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

FezVrasta avatar Jul 28 '21 17:07 FezVrasta