Closed mjuopperi closed 1 year ago
Interesting -
I think this is because you're using a globally installed serverless, and the plugin is loading locally. I'll need to check to see how other plugins are working around this.
I think you can fix this immediately for yourself by running npm install --dev serverless
inside your working directory.
That does fix it for me. It prints Running "serverless" from node_modules
and works. Thank you.
Should I have package.json with serverless and this package in dev deps for other users of the project to set it up? I'm working on a python project and only have the serverless generated package-lock.json in my project.
Good to hear 😄
I would recommend (and I think most would too) that you use a locally (i.e. repo level) install of serverless with a checked in package.json
. That way anyone using your repo keeps their versions of serverless and any plugins in sync. Doing this will saving you from future local-version mismatch headaches when new features are added, and make it easier to reproduce your builds.
Nevertheless - people do install serverless globally, so I'll update the readme to cover that use case!
(I'm closing this now the documentation has been updated. All the best on your serverless journey!)
Describe the bug After installing the plugin with
npm install --dev serverless-better-credentials
and adding it as first plugin inserverless.yml
,serverless
command produces an errorError: Cannot find module '@serverless/utils/log'
(full error below).I also tried
serverless plugin install --name serverless-better-credentials
and got the same result.If I remove it from plugins,
sls
command works again.To Reproduce
serverless
Expected behavior No error
Desktop (please complete the following information):
Node version v14.19.1
Additional context
serverless version
serverless.yml
Full error