serverless / serverless/serverless

sls package --package command doesn't create a zip file in the specified directory

Open
#6,193 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug cat/packaging
Dominant language
JavaScript
Stars
46.9k
Forks
5.7k
Avg merge
10h 7m
Merged PRs (30d)
57

Description

This is a Bug Report

Description

serverless create --template google-nodejs --path my-service
cd my-service
npm install

I edited the serverless.yml to contain a valid key path and tried the following command

serverless package --package /tmp

Running the above command doesn't produce any result in the /tmp directory. Instead, the .serverless folder is created in the my-service folder

  • What did you expect should have happened?
    I expected to see a zip file in my /tmp directory

  • What was the config you used?
    My serverless.yml config is

service: my-service # NOTE: Don't put the word "google" in here

provider:
  name: google
  stage: dev
  runtime: nodejs8
  region: us-central1
  project: ruckussgdc-mlisa
  # The GCF credentials can be a little tricky to set up. Luckily we've documented this for you here:
  # https://serverless.com/framework/docs/providers/google/guide/credentials/
  #
  # the path to the credentials file needs to be absolute
  credentials: /Users/psheoran/myKey.json

plugins:
  - serverless-google-cloudfunctions

# needs more granular excluding in production as only the serverless provider npm
# package should be excluded (and not the whole node_modules directory)
package:
  exclude:
    - node_modules/**
    - .gitignore
    - .git/**

functions:
  first:
    handler: http
    events:
      - http: path
  • What stacktrace or error message from your provider did you see?
    There was no error message in the console

Additional Data

  • Serverless Framework Version you're using: 1.44.1
  • Operating System: MacOS Mojave 10.14.3
  • Node version: 10.12.0

I followed the AWS quickstart guide and was able to generate the zip file at the same path.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Google service setup with the documented serverless.yml, then run serverless package --package /tmp and compare it with the AWS quick-start behavior. Trace the package command for the Google provider; done means the generated zip file appears in /tmp rather than only creating .serverless in the service directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, javascript, node.js
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.