Open HyperBrain opened 6 years ago
Does "serverless.useGlobal": true,
work?
It is not working for me.
Hi @fatangare, thanks for the question 👍 . This is not implemented yet (this issue is the feature request).
ah...it doesn't work for me either. It would be great to have this implemented.
@panzupa I already implemented the feature, but it is still in PR #21 but not yet merged and released. Would you mind to test if it works for you, if I attach a temporary vsix package here, that you can install using "install extension from file"? If my fix is ok, I would release it asap.
@HyperBrain Sure, no problem. I will gladly test it :-)
@panzupa Here you go. Please add your feedback to this issue ;-) And thank you
serverless-vscode-1.1.0-alpha.vsix.zip
Oh. GitHub only supports ZIP files for upload, so please extract it locally and install the vsix as extension.
I get:
Serverless: spawn serverless ENOENT
I tried to find more logs but I could. Please tell me where I should look.
Also, would be nice if plugin would ignore the region if one is already defined in serverless.yml
Running "serverless deploy function --function=fetch --region=eu-central-1 --stage=dev"
Ok. The error you get is caused, because the extension cannot find the "serverless" executable in your path. Maybe that approach is wrong and it should use npx serverless
to execute it in the current global node context.
I will provide a new version for testing.
Regarding the feature idea: Nice catch. Maybe an option useRegionFromServerlessYaml
could enable this?
Regarding the feature idea: Nice catch. Maybe an option useRegionFromServerlessYaml could enable this?
If you're asking me, then please consider such case. Someone who already has a serverless project is installing your plugin. And suddenly it deploys to the other region then one defined in serverless.yml
Personally, I think it's a bad approach. I would stay with the existing setting defaultRegion
but set it to be empty. Your plugin seeing empty value should not add --region
parameter at all. If someone wants to setup it, he can put something in the configuration.
Sounds reasonable. I will create a new GitHub issue and provide a fix (should be trivial)
Thanks @HyperBrain .
Ok. The error you get is caused, because the extension cannot find the "serverless" executable in your path. Maybe that approach is wrong and it should use npx serverless to execute it in the current global node context. I will provide a new version for testing
I don't use npx. BTW I'm testing this on Windows10 and I have serverless
in my PATH.
I believe npx ( now bundled with node ) solves for both cases. It first tries local node modules, the what's on your path, the finally installs when not available
@HyperBrain any news about this new feature?
The current version only supports locally installed per project serverless instances. It should support global serverless installations too.