You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent release of the types package references Buffer which is defined in @types/node. Without that package, users will see an error like this:
This is a somewhat common problem in the types world and there's no good solution. Fortunately the error is pretty self explanatory and most users should know how to fix. That being said, it would be nice if our types worked "out of the box" and so filing the issue for further discussion. A few ideas off the top of my head:
Remove the reference to Buffer in the types. I think this is a short term fix, though - because as we continue to make improvements to our types we will want to reference more and more node types
Add @types/node as a dependency of @azure/functions. I don't think we can do this, because we support multiple versions of node and we don't want to hard-code users to the wrong version
Make sure project templates have @types/node in the package.json. This could work, but puts the burden on the templates to pick the right version of node instead of us
The text was updated successfully, but these errors were encountered:
Decided to go with option 3. For the version, we will choose the latest version of Node corresponding to the user's version of the Functions runtime. There's a chance users are actually on an earlier version of Node, but the risk of that causing problems is minimal compared to the benefit of the template working out of the box. Since this is set in the template (as opposed to option 2), users can easily change the version themselves.
The recent release of the types package references

Buffer
which is defined in@types/node
. Without that package, users will see an error like this:This is a somewhat common problem in the types world and there's no good solution. Fortunately the error is pretty self explanatory and most users should know how to fix. That being said, it would be nice if our types worked "out of the box" and so filing the issue for further discussion. A few ideas off the top of my head:
Buffer
in the types. I think this is a short term fix, though - because as we continue to make improvements to our types we will want to reference more and more node types@types/node
as a dependency of@azure/functions
. I don't think we can do this, because we support multiple versions of node and we don't want to hard-code users to the wrong version@types/node
in the package.json. This could work, but puts the burden on the templates to pick the right version of node instead of usThe text was updated successfully, but these errors were encountered: