Code Monkey home page Code Monkey logo

Comments (13)

softprops avatar softprops commented on June 20, 2024 1

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

from serverless-vscode.

fatangare avatar fatangare commented on June 20, 2024

Does "serverless.useGlobal": true, work?
It is not working for me.

from serverless-vscode.

HyperBrain avatar HyperBrain commented on June 20, 2024

Hi @fatangare, thanks for the question 👍 . This is not implemented yet (this issue is the feature request).

from serverless-vscode.

serverlesspolska avatar serverlesspolska commented on June 20, 2024

ah...it doesn't work for me either. It would be great to have this implemented.

from serverless-vscode.

HyperBrain avatar HyperBrain commented on June 20, 2024

@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.

from serverless-vscode.

serverlesspolska avatar serverlesspolska commented on June 20, 2024

@HyperBrain Sure, no problem. I will gladly test it :-)

from serverless-vscode.

HyperBrain avatar HyperBrain commented on June 20, 2024

@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.

from serverless-vscode.

serverlesspolska avatar serverlesspolska commented on June 20, 2024

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"

from serverless-vscode.

HyperBrain avatar HyperBrain commented on June 20, 2024

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?

from serverless-vscode.

serverlesspolska avatar serverlesspolska commented on June 20, 2024

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.

from serverless-vscode.

HyperBrain avatar HyperBrain commented on June 20, 2024

Sounds reasonable. I will create a new GitHub issue and provide a fix (should be trivial)

from serverless-vscode.

serverlesspolska avatar serverlesspolska commented on June 20, 2024

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.

from serverless-vscode.

JaderCM avatar JaderCM commented on June 20, 2024

@HyperBrain any news about this new feature?

from serverless-vscode.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.