Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for deploying individual packages. #48

Conversation

gertjvr
Copy link
Contributor

@gertjvr gertjvr commented Oct 16, 2016

Serverless added the ability to deploy functions individually when using serverless-webpack it doesn't change the paths of the individual artifacts similar to how it change the this.serverless.package.artifact.

This solutions is very brittle as it copies how individual packages was implemented.

@lpil
Copy link

lpil commented Oct 18, 2016

Looks like there's some logic there. Is this something that could be tested? :)

@gertjvr
Copy link
Contributor Author

gertjvr commented Oct 18, 2016

Would have added tests but there was non for the existing behavior and the logic was copied from serverless individual deployment feature. But if that is a requirement then will add some tests.

@n8sabes
Copy link

n8sabes commented Oct 22, 2016

@gertjvr are you able to deploy individual functions (and individually packaged)? I'm using your PR48, and it packages correctly, but when I execute sls deploy function -f foobar webpack is not run --- serverless simply uploads the raw file without transpiling or including imported logic. I posted issue #50 on this.

@gertjvr
Copy link
Contributor Author

gertjvr commented Oct 31, 2016

any update on when this will be merge?

@gertjvr
Copy link
Contributor Author

gertjvr commented Nov 14, 2016

Any chance this can get merged?

briguy202 referenced this pull request in briguy202/serverless-webpack Nov 14, 2016
@thenikso
Copy link
Contributor

Looking at it now. Will merge asap

@bcsan
Copy link

bcsan commented May 18, 2017

sls deploy function -f foobar still doesn't work to me. Anything am I missing?

@sheastrickland sheastrickland restored the fix_individual_deployment branch June 2, 2017 04:30
@fcheong3b
Copy link

Same for me, I'm doing single function deploy and getting an error on Lambda deploy because the web package is not doing his work.
Unable to import module 'model-job_request-get_details': Error
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
Any update about it?

@delprofundo
Copy link

delprofundo commented Jul 27, 2017

So the plugin is just uploading the code not compiling for deploy function. If i pull out the es6 stuff it then rejects like above, talking about functions that are there but saying they aren't.

I'm getting this:

Syntax error in module ‘handler’: SyntaxError
import { cwbRESify } from ‘./lib/representors/RESifier.representor.library’;
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)

if i do this then do sls deploy -v it then works fine after the full deploy

@HyperBrain
Copy link
Member

A new version that includes #130 will be published today. With that it should be possible to use serverless deploy --function=XXXXX to just deploy a single function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants