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

RangeError: Invalid count value error #9112

Closed
marvincd opened this issue Jun 26, 2023 · 7 comments
Closed

RangeError: Invalid count value error #9112

marvincd opened this issue Jun 26, 2023 · 7 comments
Labels
🐛 Bug Diagnostics Error messages/diagnostics Stale Inactive issues

Comments

@marvincd
Copy link

🐛 bug report

parcel build returning throwing an error

🎛 Configuration (.babelrc, package.json, cli command)

CLI command: rm -rf dist/* && rm -rf .parcel-cache && parcel build index.html --public-url ./

🤔 Expected Behavior

parcel build should create a build output in the dist folder

😯 Current Behavior

CLI command: rm -rf dist/* && rm -rf .parcel-cache && parcel build index.html --public-url ./ throws the error below

RangeError: Invalid count value```

full stack trace

```🚨 Build failed.
RangeError: Invalid count value
    at String.repeat (<anonymous>)
    at $796233c1fee0ccb8$export$2e2bcd8739ae039 (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/codeframe/lib/codeframe.js:36028:54)
    at $f02d6a9d30f55938$export$2e2bcd8739ae039 (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/utils/lib/index.js:34143:101)
    at $25f952b9ba2ff3e6$var$writeDiagnostic (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/reporter-cli/lib/CLIReporter.js:7473:162)
    at $25f952b9ba2ff3e6$export$12358408d9820617 (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/reporter-cli/lib/CLIReporter.js:7439:19)
    at Object.report (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/reporter-cli/lib/CLIReporter.js:7501:16)
    at ReporterRunner.report (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/core/lib/ReporterRunner.js:98:33)
    at Parcel._build (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/core/lib/Parcel.js:363:34)
    at async Parcel.run (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/@parcel/core/lib/Parcel.js:195:18)
    at async run (/Users/ola/Documents/Github/Gambloc-2.0/frontend/node_modules/parcel/lib/cli.js:308:7)

💁 Possible Solution

🔦 Context

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel 2.9.3
Node v16.18.0
npm/Yarn 8.19.2
Operating System macOS ventura 13.3.1
@gmerciel
Copy link

gmerciel commented Jul 7, 2023

I'm having the same issue

@marvincd
Copy link
Author

marvincd commented Jul 7, 2023

Hopefully we'll get a response soon

@gmerciel
Copy link

gmerciel commented Jul 7, 2023

Going back to previous commits that worked, I found that my problem was with a line like this:
delete (gmap)
Changing to gmap = undefined allowed me to build

@devongovett
Copy link
Member

Please provide a reproduction.

@furkanmustafa
Copy link

We also encountered this issue, but I believe it is fairly difficult to produce a reproduction. Because parcel is unable to report what the problem is.

The spot in the enourmous file @parcel/codeframe/lib/codeframe.js:36028 here, is trying to mark the error location, possibly a multi line spanning problematic code ? so it calculates positions for the first line/col, last line/col and such.. but apparently there is a problem in the calculation. Which I couldn't read/study further to understand better. yet.

@studiosciences
Copy link

I'm seeing this after upgrading to 2.9.3, so it could be anywhere in our code. Based on previous comments and related issues, I've tried:

  • deleting all css/less imports
  • not using the delete command.

This did not fix anything.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Diagnostics Error messages/diagnostics Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

6 participants