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
I'm attempting to use Typescript with serverless and hit an issue with the dashboard plugin when I changed my function file from a .js extension to .ts. After this change I would see the following error when attempting to invoke my function or deploy it:
Warning: Skipping wrapping for Function: <Your Function Name Here>
This appears to be due to the check on line 38 in the wrapUtils.js file:
Effectively if a node runtime is declared in the configuration file the function's file must have a .js extension or the dashboard plugin will skip wrapping the function. Consequently if the file is a typescript file with a .ts extension it won't be wrapped.
It's possible this plugin isn't intended to support typescript functions, but I wasn't able to find an explicit reference in documentation so I've created this issue in case it's intended that the plugin should support functions in Typescript files.
The text was updated successfully, but these errors were encountered:
Running into this as well using the serverless-esbuild plugin. I had a look into the zip when this warning is printed and the main difference is the serverless sdk isn't automatically included. I found some explanation of what this SDK is and how to include it when using a bundler https://www.serverless.com/framework/docs/guides/sdk/nodejs
I think the main consequence is that instrumentation isn't automatic. Would like the warning to better describe the tradeoffs though.
I'm attempting to use Typescript with serverless and hit an issue with the dashboard plugin when I changed my function file from a
.js
extension to.ts
. After this change I would see the following error when attempting to invoke my function or deploy it:This appears to be due to the check on line 38 in the wrapUtils.js file:
dashboard-plugin/lib/wrap-utils.js
Lines 27 to 47 in 897b76e
Effectively if a
node
runtime is declared in the configuration file the function's file must have a.js
extension or the dashboard plugin will skip wrapping the function. Consequently if the file is a typescript file with a.ts
extension it won't be wrapped.It's possible this plugin isn't intended to support typescript functions, but I wasn't able to find an explicit reference in documentation so I've created this issue in case it's intended that the plugin should support functions in Typescript files.
The text was updated successfully, but these errors were encountered: