serverless-plugin-aws-alerts
serverless-plugin-aws-alerts copied to clipboard
Support for Serverless v2
This is a Feature Proposal
Description
NPM warns of possible compatibility issue with Serverless v2
Everything appears to work with sls-v2. Packaging just needs updating. Alerts are still being created during deployment.
When running npm audit fix we see the following warning:
npm WARN [email protected] requires a peer of serverless@^1.12.0 but none is installed. You must install peer dependencies yourself.
Additional Data
- Serverless Framework Version: [email protected]
- Stack Trace: N/A
- Provider Error messages: when running
npm audit fix...
npm WARN [email protected] requires a peer of serverless@^1.12.0 but none is installed. You must install peer dependencies yourself.
Alerts continue to be correctly created in AWS, but NPM doesn't expect the plugin to work.
@d-fay Latest version (v1.7.3) is configured to list servelress at v2:
https://github.com/ACloudGuru/serverless-plugin-aws-alerts/blob/v1.7.3/package.json#L42
Please upgrade
I've done npm i serverless-plugin-aws-alerts serverless-mysql serverless
...
+ [email protected]
+ [email protected]
+ [email protected]
added 630 packages from 391 contributors, updated 3 packages and audited 652 packages in 118.474s
...
yet still
$ sls deploy --aws-profile serverless-dev-extravision --stage live
Type Error ---------------------------------------------
TypeError: Cannot read property 'defineFunctionProperties' of undefined
at new AlertsPlugin (/home/falken/workspace/serverless/bt-serverless-quiz/node_modules/serverless-plugin-aws-alerts/src/index.js:13:36)
at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:84:28)
at /usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:121:31
at Array.forEach (<anonymous>)
at PluginManager.loadAllPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:121:8)
at /usr/local/lib/node_modules/serverless/lib/Serverless.js:98:35
serverless.yml :
custom:
alerts:
stages:
- live
topics:
alarm:
topic: ${self:service}-${opt:stage}-alerts-alarm
notifications:
- protocol: email
endpoint: [email protected]
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.22.7
Framework Version: 1.77.1
Plugin Version: 3.6.18
SDK Version: 2.3.1
Components Version: 2.33.0
Setting in package.json the plugin version to "1.6.1" fixes it