Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

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

Open
FezVrasta opened this issue Jul 23, 2021 · 9 comments
Labels

Comments

@FezVrasta
Copy link

FezVrasta commented Jul 23, 2021

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.

@nikolay-borzov
Copy link
Collaborator

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

@FezVrasta
Copy link
Author

This is the list of the files

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

@nikolay-borzov
Copy link
Collaborator

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
Copy link
Author

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

@FezVrasta
Copy link
Author

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

@nikolay-borzov
Copy link
Collaborator

Have you tried omitting single quotes?

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

@FezVrasta
Copy link
Author

~/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
Copy link
Collaborator

What terminal do you use? Try Git Bash

@FezVrasta
Copy link
Author

FezVrasta commented Jul 28, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants