On executing 'func init' command from an empty directory to create a azure function fails with following error:
events.js:298
throw er; // Unhandled 'error' event
^
Error: spawn C:\Users\<XYZ>\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin/func ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\Users\\<XYZ>\\AppData\\Roaming\\npm\\node_modules\\azure-functions-core-tools\\bin/func',
path: 'C:\\Users\\<XYZ>\\AppData\\Roaming\\npm\\node_modules\\azure-functions-core-tools\\bin/func',
spawnargs: [ 'init' ]
}
Anyone any suggestions on the same?
Thanks for the update @silent . Googling the same, I also did land into the same link.
To followup on the suggestions at the Github, I had to perform following steps:
C:\Users\< XYZ >\AppData\Roaming\npm\node_modules\azure-functions-core-tools
"dependencies": {
"chalk": "3.0.0",
"command-exists": "1.2.8",
"glob": "7.1.6",
"https-proxy-agent": "3.0.1",
"progress": "2.0.3",
"rimraf": "3.0.0",
"tmp": "0.1.0",
"unzipper": "0.10.8"
},
Remember to replace "< XYZ >" with your own Username on the machine.