A memo on the cause and response when encountering the “replaceAll is not a function” error in Node.js programming. When using the replaceAll() function in Node.js or JavaScript language, you may encounter an error.
The solution is simple: use the replace function instead of the replaceAll function.
"hoge hoge hoge".replaceAll(/ /g, '')
Uncaught TypeError: "hoge hoge hoge".replaceAll is not a function
"hoge hoge hoge".replace(/ /g, '')
'hogehogehoge'
There is no replaceAll in JavaScript [javascript - String.prototype.replaceAll() not working - Stack Overflow](https://stackoverflow.com/questions/13340131/string-prototype-replaceall-not-working)