Our build environment currently uses node 12.19.0 and npm 6.14.8. When I saw that the new LTS version of node 14.15.1 (still npm 6.14.8) was available I downloaded it and ran our webpack build script and received this error. Is the new version of node complaining about an error that was always there, but ignored by 12.19.0?
internal/fs/utils.js:781
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of XMLElement
at writeFile (fs.js:1436:5)
at go$writeFile (/Components/node_modules/graceful-fs/graceful-fs.js:131:14)
at Object.writeFile (/Components/node_modules/graceful-fs/graceful-fs.js:128:12)
at /Components/node_modules/jest-html-reporter/dist/main.js:47:13
at /Components/node_modules/mkdirp/index.js:48:26
at callback (/Components/node_modules/graceful-fs/polyfills.js:295:20)
at FSReqCallback.oncomplete (fs.js:184:5) {
code: 'ERR_INVALID_ARG_TYPE'
}
The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined #1323
1 TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object 0 Project is not running in Angular
0 The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined Hot Network Questions If I disagree with the research community, should I review papers against my beliefs or the community's?
Uplift jest-html-reporter version to at least 3.1.3
Add a second argument to writeFileSync
Instead of:
fs.writeFileSync(`${folderName}/styles.css`);
Do this:-
fs.writeFileSync(`${folderName}/styles.css`, '');
It tells wfs what to write to the file. It can be left empty
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With