Monday, February 22, 2016

Error while building and running ionic app for android platform - add platform class js




Problem - Error while building and running ionic app for android platform.

Running command: "C:\Program Files (x86)\nodejs\node.exe" E:\L\D\C\hooks\after_prepare\010_add_platform_class.js E:\L\D\C
net.js:617
    throw new TypeError('invalid data');
    ^

TypeError: invalid data
    at Socket.write (net.js:617:11)
    at Object. (E:\L\D\C\hooks\after_prepare\010_add_platform_class.js:90:22)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)
    at node.js:963:3
ERROR running one or more of the platforms: Error: Hook failed with error code 1: E:\L\D\C\hooks\after_prepare\010_add_platform_class.js
You may not have the required environment or OS to run this project


Solution - Check, if folder is read only. Typically after checkout from TFS , folder is marked as read only. Remove read only attribute from folder for all files and this error would be resolved.

Reference - https://forum.ionicframework.com/t/ionic-build-android-error-windows-7/16166

No comments:

Post a Comment