Azure / Azure/azure-functions-core-tools
[v1] C++ 2013 Runtime Dependency not bundled/documented
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 15
Description
Without the [Visual C++ 2013 runtime](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist#visual-studio-2013-vc-120) installed, attempting to run a Azure Functions v1 project will result in an error similar to this:
```
cd module.js:583
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified module could not be found.
\\?\C:\Users\user\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\x86\edge_nativeclr.node
```
`edge_nativeclr.node` is part of https://github.com/tjanczuk/edge, some sort of bridge between .NET and Node.js (not to be confused with [Edge](https://www.microsoft.com/edge) the browser, or https://github.com/edge-js the templating engine!). This error occurs regardless of the presence of functions written in Javascript.
Later versions of edge.js, apparently [use the C++ 2015 runtime](https://github.com/tjanczuk/edge/issues/583#issuecomment-411694058), which seems to be evergreen-ish and is definitely is bundled with Visual Studio. This might bump the Node version which is probably undesired at this point, although running a 5 year old version of Node is probably undesired too.
I guess a fix here would be to ensure the C++ 2013 runtime is included in setup. Alternatively detect when it is not and disable JS function support, or improve the understandability of the error message.
see: https://github.com/Azure/azure-functions-core-tools/issues/163
Contributor guide
Research direction
Start with the Azure Functions v1 setup/install path and the edge_nativeclr.node load failure described in the issue. Reproduce it on Windows without the Visual C++ 2013 runtime, then determine whether setup should bundle it, document it, or report a clearer unsupported state; done when the chosen behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, cpp, node.js
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100