TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object

D:\Final-test\Mobile-App>cordova build android
Running command: “C:\Program Files\nodejs\node.exe” D:\Final-test\Mobile-App\hooks\after_prepare\icons_and_splashscreens.js D:\Final-test\Mobile-App
Running command: “C:\Program Files\nodejs\node.exe” D:\Final-test\Mobile-App\hooks\after_prepare\update_platform_config.js D:\Final-test\Mobile-App
events.js:187
throw er; // Unhandled ‘error’ event
^

TypeError [ERR_INVALID_ARG_TYPE]: The “chunk” argument must be one of type string or Buffer. Received type object
at validChunk (_stream_writable.js:268:10)
at WriteStream.Writable.write (_stream_writable.js:303:21)
at D:\Final-test\Mobile-App\hooks\after_prepare\update_platform_config.js:340:32
at arrayEach (D:\Final-testMobile-App\node_modules\lodash\lodash.js:516:11)
at Function.forEach (D:\Final-test\Mobile-App\node_modules\lodash\lodash.js:9342:14)
at D:\Final-test\Mobile-App\hooks\after_prepare\update_platform_config.js:335:11
at Object. (D:\Final-test\Mobile-App\hooks\after_prepare\update_platform_config.js:344:3)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
Emitted ‘error’ event on WriteStream instance at:
at errorOrDestroy (internal/streams/destroy.js:108:12)
at validChunk (_stream_writable.js:271:5)
at WriteStream.Writable.write (_stream_writable.js:303:21)
[… lines matching original stack trace …]
at Object.Module._extensions…js (internal/modules/cjs/loader.js:973:10) {
code: ‘ERR_INVALID_ARG_TYPE’
}
Error: Hook failed with error code 1: D:\Final-test\Mobile-App\hooks\after_prepare\update_platform_config.js

2 Likes