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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Bug Report
Error Description
If plugin is added via serverless.pluginManager.addPlugin function as part of an other plugin Globals.v3Utils.log becomes undefined
We have an internal plugin that looks like this (some un related parts removed for clarity):
importServerlessfrom'serverless';importPlugin,{PluginStatic}from'serverless/classes/Plugin';import{ServerlessCustomDomain}from'serverless-domain-manager';classDomainManagerPluginimplementsPlugin{serverless: Serverless;hooks: Plugin.Hooks;constructor(serverless: Serverless){this.serverless=serverless;this.hooks={initialize: ()=>this.injectConfig(),// run in hook in case of config needing to be resolved, e.g. shard from params};// Does not work, need to add the plugin manually, package internal logger breaks for an unknown reasonserverless.pluginManager.addPlugin(ServerlessCustomDomainasPluginStatic);}privateinjectConfig(){if(!this.serverless.service.custom){this.serverless.service.custom={};}this.serverless.service.custom.customDomain={domainName: 'api.our.domain.com',basePath: 'our-base-path',stage: '$default',apiType: 'http',endpointType: 'regional',createRoute53Record: false,createRoute53IPv6Record: false,};}}
If I remove the serverless.pluginManager.addPlugin(...) line and add serverless-domain-manager to the plugin section of serverless.yml everything works as expected
Command Run sls deploy
Console Output
Stack **** failed to deploy (60s)
Environment: linux, node 18.18.2, framework 3.37.0 (local), plugin 7.2.0, SDK 4.5.1
Credentials: Local, "default" profile
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
TypeError: Cannot read properties of undefined (reading 'verbose')
at Logging.logInfo (****/node_modules/.pnpm/[email protected][email protected]/node_modules/serverless-domain-manager/dist/src/logging.js:24:43)
at ServerlessCustomDomain.<anonymous> (****/node_modules/.pnpm/[email protected][email protected]/node_modules/serverless-domain-manager/dist/src/index.js:180:35)
at Generator.throw (<anonymous>)
at rejected (****/node_modules/.pnpm/[email protected][email protected]/node_modules/serverless-domain-manager/dist/src/index.js:6:65)
Error: Process completed with exit code 1.
Domain Manager Configuration
Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue.
Community Note
Bug Report
Error Description
If plugin is added via
serverless.pluginManager.addPlugin
function as part of an other pluginGlobals.v3Utils.log
becomesundefined
We have an internal plugin that looks like this (some un related parts removed for clarity):
If I remove the
serverless.pluginManager.addPlugin(...)
line and addserverless-domain-manager
to the plugin section of serverless.yml everything works as expectedCommand Run
sls deploy
Console Output
Domain Manager Configuration
Replace this with your own
serverless.yml
file (anonymized, of course) to help us better resolve your issue.Versions
The text was updated successfully, but these errors were encountered: