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

V3: Deploying a single function with individual packaging does not work #181

Closed
nicolasdonoso opened this issue Aug 4, 2017 · 10 comments
Closed
Assignees
Labels

Comments

@nicolasdonoso
Copy link

The whole project deploys correctly, but when deploying individual functions I'm getting the following error:

Serverless: Bundling with Webpack...
Time: 6122ms
                                     Asset     Size  Chunks                    Chunk Names
functions/model/job_request/get_details.js  3.84 MB       0  [emitted]  [big]  functions/model/job_request/get_details
Serverless: Packaging function: job-request-get_details...

  Error --------------------------------------------------

  ENOENT: no such file or directory, open '<project-serverless>/.webpack/.serverless/job-request-get_details.zip'
@HyperBrain
Copy link
Member

I analyzed the problem and found the reason. In the individual packaging branch, the plugin uses now the standard paths for the packaging and does not alter Serverless internals anymore.
I'll fix it now and commit it to the branch. I'll let you know as soon as that is done, so that you can do an additional test.

@HyperBrain
Copy link
Member

@nicolasdonoso The issue should be fixed in #177 . Could you please check again with the v3.0.0-individual-packaging branch? I did some tests and it worked for me now.
As soon as this is verified I'll merge #177 into the v3 branch.

@nicolasdonoso
Copy link
Author

@HyperBrain I reinstalled the package from the branch:

npm install github:elastic-coders/serverless-webpack#v3.0.0-individual-packaging --save-dev
└── [email protected]  (git://github.com/elastic-coders/serverless-webpack.git#a9c7028f4011abfa19be7e91a54d1a4d4773ad30)

After doing that I get this error with everything as it was when it was working fine:

Serverless Error ---------------------------------------

  Serverless plugin "serverless-webpack" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file.

@HyperBrain
Copy link
Member

I'll check right away

@HyperBrain
Copy link
Member

Indeed something went wrong with the commit.

@HyperBrain
Copy link
Member

HyperBrain commented Aug 4, 2017

@nicolasdonoso Fixed! I missed to commit one change 😃 .

Please remove node_modules/serverless-webpack and do a new npm install. Should work now.
My tests with the babel-dynamic-example within the plugin worked and I was able to deploy the functions individually.

@HyperBrain
Copy link
Member

@nicolasdonoso I merged the branch into the v3.0.0 branch. Please do your final tests there.

@HyperBrain HyperBrain mentioned this issue Aug 5, 2017
@HyperBrain HyperBrain removed this from the 3.0.0 milestone Aug 5, 2017
@nicolasdonoso
Copy link
Author

@HyperBrain just tested v3.0.0 and it work correctly, thanks for the help!

@HyperBrain
Copy link
Member

@nicolasdonoso Thanks for the feedback. I will close this issue then.

@nicolasdonoso
Copy link
Author

@HyperBrain v3.0.0 is working correctly when I deploy a function that has been already inside a complete deploy of the project. But every time I try to add a new function a get an error like the following one:

node_modules/.bin/sls deploy function -f notifier-progress

  Serverless Error ---------------------------------------

  The function "notifier-progress" you want to update is not yet deployed. Please run "serverless deploy" to deploy your service. After that you can redeploy your services functions with the "serverless deploy function" command.

The main fact to use single functions deployments is to avoid deploying everything, but this is only letting me add changes to functions that are already created and not to add new ones to my project with out have to deploy all.
Is this considered on the estable v3.0.0??

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

No branches or pull requests

2 participants