Invalid string length error thrown
See original GitHub issueIs this a bug report?
Yes
After running react-script
for a while, I get an exception thrown with the stacktrace:
/Users/will/Code/collect/node_modules/webpack/lib/Stats.js:221
text += `\n @ ${current.readableIdentifier(requestShortener)}`;
^
RangeError: Invalid string length
at formatError (/Users/will/Code/collect/node_modules/webpack/lib/Stats.js:221:30)
at Array.map (<anonymous>)
at Stats.toJson (/Users/will/Code/collect/node_modules/webpack/lib/Stats.js:229:56)
at Compiler.<anonymous> (/Users/will/Code/collect/node_modules/html-webpack-plugin/index.js:68:44)
at Compiler.applyPluginsAsyncSeries (/Users/will/Code/collect/node_modules/tapable/lib/Tapable.js:206:13)
at Compiler.emitAssets (/Users/will/Code/collect/node_modules/webpack/lib/C
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
invalid string length
Environment
node -v
:v8.4.0
yarn --version
(if you use Yarn):1.3.2
npm ls react-scripts
(if you haven’t ejected):1.1.1
Then, specify:
- Operating system: Mac os
- Browser and version (if relevant): n/a
Steps to Reproduce
(Write your steps here:)
- run
yarn start
- make a few changes, causing recompliation
- wait until the error happens
Expected Behavior
This shouldn’t happen
Actual Behavior
The error above gets thrown into the terminal, and the process stops.
I’ve seen this error reported in a few different repos:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Uncaught RangeError: Invalid string length when appending ...
I got this error: Uncaught RangeError: Invalid string length. And Fix it by use i for outer for loop, use DIFFERENT j for...
Read more >RangeError: Invalid string length with large files. · Issue #35973
When i'm trying to read a large Json File (700MB - 26.640.222 lines) using ReadStream i'm getting the error: "RangeError: Invalid string length" ......
Read more >RangeError: invalid array length - JavaScript - MDN Web Docs
The JavaScript exception "Invalid array length" occurs when specifying an array length that is either negative, a floating number or exceeds ...
Read more >HTML : Uncaught RangeError: Invalid string length ... - YouTube
HTML : Uncaught RangeError: Invalid string length when appending to a string in JavaScript [ Beautify Your Computer ...
Read more >Error: Invalid string. Length must be a multiple of 4
Hi Can anyone help to resolve the issue, Any comment is much appreciated. The issue and log is given below. Invalid string. Length...
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
Very weird – we’re upgrading to webpack 4 soon and discontinuing use of
webpack-dev-server
, so hopefully this goes away in 2.x.I also had this issue, though I’m not using
create-react-app
, justwebpack-dev-server
.It seems be working after changing the
devtool
option to something else, and then back again, in the webpack config & freeing up some RAMNode: 8.9.5 OS: Win 7