[v.1.0.0-rc.4] RangeError: Invalid count value
See original GitHub issueDescribe 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
- yarn:
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:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
works fine
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.