vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

Azure Functions Core Tools for python project problem

Open equidevium opened this issue 7 years ago • 7 comments

Hello there,

I am running into a very annoying issue. i am installing azure functions npm i -g azure-functions-core-tools@2 like that. Then i am trying to test the 'func'. And i am getting the 'func' is not recognized as an internal or external command, operable program or batch file. message all the time.

I have tried multiple times to uninstall and install again. Checked all the prerequisites but no clue why it is failing.

Can please someone help here?

equidevium avatar Jul 01 '19 14:07 equidevium

Something that i want to add is the following. I tried multiple times to create new projects after fresh install and uninstall of the Azure Functions extension for visual studio code but i had no luck.

equidevium avatar Jul 01 '19 14:07 equidevium

@equidevium For your first issue, the install location of the core tools needs to be added to your PATH. This detail is mentioned at the end of the "Verify prerequisites" section, but perhaps it's not obvious. The install doesn't do this automatically. Can you check that and let me know if that fixes the problem?

As for the creating new projects, please file that issue on https://github.com/microsoft/vscode-azurefunctions/issues (the repo for the extension itself) because you're identifying a potential product issue rather than doc issue.

kraigb avatar Jul 01 '19 17:07 kraigb

Hello there @kraigb thanks for the response. I will try what you said right away and i will keep you updated.

equidevium avatar Jul 01 '19 17:07 equidevium

C:\Users*****\AppData\Roaming\npm\node_modules\azure-functions-core-tools\lib\main.js

I tried to add this to environment variables but still when i opened the terminal from VSC to run func i had the same effect.

I think i must be doing something wrong.

equidevium avatar Jul 01 '19 17:07 equidevium

The entry in PATH needs to be the folder that contains "func.cmd". For example, on my computer it's C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\NodeJs. That's the folder that's included in my PATH environment variable. (Within that folder is a node_modules\azure-functions-core-tools folder as well.)

Try running "where /r \ func.cmd" from c:\ and see what it comes up with. If it's your AppData\Roaming\folder, then add that to the PATH.

kraigb avatar Jul 01 '19 17:07 kraigb

Oh omg. Thanks a lot. You saved my sanity for that. I owe you a beer ( or whatever drink you enjoy ).

equidevium avatar Jul 01 '19 17:07 equidevium

Dr Pepper or non-alcoholic lemonade works just fine. :) Glad we got it figured out...enjoy playing with Functions!

kraigb avatar Jul 01 '19 17:07 kraigb