hard-source-webpack-plugin
hard-source-webpack-plugin copied to clipboard
RangeError: "size" argument must not be larger than
This was a one time error. So I'm just gonna put it here as an FYI instead of a thorough report due to a tight deadline. But I just upgraded to 0.7.4 and got this error message:
RangeError: "size" argument must not be larger than 2147483647
at Function.Buffer.allocUnsafe (buffer.js:253:3)
at alloc (C:\Users\**\repo\**\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:42:17)
at Append2._readFile (C:\Users\**\repo\**\node_modules\hard-source-webpack-plugin\lib\SerializerAppend2.js:156:14)
at <anonymous>
Before to find origin of this issue, one way to play around is to clear your cache.
rm -rf node_modules/.cache/*
I also experienced the same error.
@ianoti was it a one time thing? Or has it been repeated?
@mzgoddard It is difficult to reproduce, but to increase the chances of seeing the error, if you are working on a branch and checkout to another branch that changes different files from what you are working on, it increases the chance of the error occurring.
I have only seen the error 3 times, haven't seen it since I cleared the cache
I also experienced the same error.
@mzgoddard My colleague reproduces this bug. When building, use Ctrl-C to cancel, then build again, you will get this error.
Hi, everyone. i can reproduce this bug too. I am working on two different branch, and each branch has different package.json file(so node dependency is different)
- I switched to first branch and run
npm install
. - When fetching proper packages, i canceled this process,
Ctrl + C
- I switched to second branch and run
npm install
. - When fetching proper packages, i canceled this process,
Ctrl + C
- And i run
npm install
again on second branch.
From this time, i always get the above result. This reproduce steps is unusual, but i just want to let you know.
I also experience this error. [email protected] [email protected]
Before to find origin of this issue, one way to play around is to clear your cache.
rm -rf node_modules/.cache/*
This worked for me.
I'm using: "hard-source-webpack-plugin": "^0.12.0", "webpack": "^4.24.0"
For me the problem was the backup .zip
file that I have stored which was very large (over 2GB). So just look for large unnecessary files in your project or perhaps some cleanup should do the job.
I have experienced this error in different circumstances (in react-native project) but maybe it will help somebody.