question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v.1.0.0-rc.4] RangeError: Invalid count value

See original GitHub issue

Describe the bug

I’m using vite to build react app and I have a bug when execute vite build. This bug occurred at vite@1.0.0-rc.4, but not vite@1.0.0-rc.3 . And also, the bug didn’t occur when I remove styled-components from the project.

Reproduction

https://github.com/wan-nyan-wan/vite-warning-bugs

System Info

  • vite@1.0.0-rc.4
  • OS: Ubuntu 18.04
  • Node: v14.5.0
  • Optional:
    • yarn: 1.22.4

Logs

Below is a build log.

$ yarn build      
yarn run v1.22.4
$ tsc --noEmit && vite build
vite v1.0.0-rc.4
⠧ Building for production...
[vite] warnings while transforming index.09068383.js with esbuild:
The following expression is not returned because of an automatically-inserted semicolon
[vite] error while transforming index.09068383.js with esbuild:
RangeError: Invalid count value
    at String.repeat (<anonymous>)
    at Object.generateCodeFrame (/home/sugerme/web/vite-bug/node_modules/@vue/shared/dist/shared.cjs.js:60:40)
    at printMessage (/home/sugerme/web/vite-bug/node_modules/vite/dist/node/esbuildService.js:108:52)
    at /home/sugerme/web/vite-bug/node_modules/vite/dist/node/esbuildService.js:63:44
    at Array.forEach (<anonymous>)
    at Object.exports.transform (/home/sugerme/web/vite-bug/node_modules/vite/dist/node/esbuildService.js:63:29)
    at async Chunk$1.render (/home/sugerme/web/vite-bug/node_modules/rollup/dist/shared/rollup.js:11227:20)
    at async /home/sugerme/web/vite-bug/node_modules/rollup/dist/shared/rollup.js:12201:40
    at async Promise.all (index 0)
[write] dist/asset/index.09068383.js 0.00kb, brotli: 0.00kb
[write] dist/index.html 0.30kb, brotli: 0.14kb
Build completed in 1.70s.

Done in 4.53s.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
quantuminformationcommented, Sep 17, 2020
    "vite": "1.0.0-rc.3"

works fine

1reaction
evanwcommented, Aug 15, 2020

This looks like two bugs: one for Vite about pretty-printing warnings with large line numbers, and one for Rollup for an incorrect code transformation. I filed the Rollup bug here: https://github.com/rollup/rollup/issues/3729.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RangeError: repeat count must be less than infinity - JavaScript
repeat() method is used with a count argument that is infinity. Message. RangeError: Invalid string length (V8-based) RangeError: Invalid count ...
Read more >
ESLint Error 'Invalid count value' when run with --fix
I have resolved the issue. If there is no blank line before the return statement in anywhere in the code we will get...
Read more >
Important notes — Borg - Deduplicating Archiver 1.2.2 ...
AssertionError: Corrupted segment reference count - corrupted index or hints ... The reason for this is a invalid (and useless) metadata key that...
Read more >
2022 Changelog | ClickHouse Docs
For example, if an incompatible version saved state of ... Fix incorrect query result when trivial count optimization is in effect with array...
Read more >
system - Nim Programming Language
rationals module for rational numbers. Ordinals. Ordinal type includes integer, bool, character, and enumeration types, as well as their subtypes. Proc ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found