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

Warmup Zip not found on deployment process #270

Closed
volbrene opened this issue May 31, 2021 · 2 comments
Closed

Warmup Zip not found on deployment process #270

volbrene opened this issue May 31, 2021 · 2 comments
Labels

Comments

@volbrene
Copy link

volbrene commented May 31, 2021

Hi, thank you for this nice plugin, however, I get the following error as soon as I deploy my nestjs application in lambda. I have tried everything, but I don't know what to do. If I remove the plugin from serverless.yaml, the deployment works perfectly.

Serverless: Deprecation warning: Detected ".env" files. In the next major release variables from ".env" files will be automatically loaded into the serverless build process. Set "useDotenv: true" to adopt that behavior now.
            More Info: https://www.serverless.com/framework/docs/deprecations/#LOAD_VARIABLES_FROM_ENV_FILES
Serverless: WarmUp: Creating warmer "officeHoursWarmer" to warm up 1 function:
Serverless:           * test-url-forwarder-service-dev-main
Serverless: WarmUp: Creating warmer "outOfOfficeHoursWarmer" to warm up 1 function:
Serverless:           * test-url-forwarder-service-dev-main
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: WarmUp: Creating warmer "officeHoursWarmer" to warm up 1 function:
Serverless:           * test-url-forwarder-service-dev-main
Serverless: WarmUp: Creating warmer "outOfOfficeHoursWarmer" to warm up 1 function:
Serverless:           * test-url-forwarder-service-dev-main
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
 
 Error ---------------------------------------------------
 
  Error: Error: Error: ENOENT: no such file or directory, open '/Users/XXX/development/uniqversum/backend/url-forwarder-service/app/.build/.serverless/warmUpPluginOutOfOfficeHoursWarmer.zip' encountered during hash calculation for provided filePath: /Users/XXX/development/uniqversum/backend/url-forwarder-service/app/.build/.serverless/warmUpPluginOutOfOfficeHoursWarmer.zip
      at ReadStream.<anonymous> (/usr/local/lib/node_modules/serverless/lib/plugins/aws/package/lib/getHashForFilePath.js:23:13)
      at ReadStream.emit (events.js:314:20)
      at ReadStream.EventEmitter.emit (domain.js:483:12)
      at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:301:14
      at /usr/local/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:352:16
      at FSReqCallback.oncomplete (fs.js:156:23)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              12.19.0
     Framework Version:         2.43.1
     Plugin Version:            5.1.4
     SDK Version:               4.2.2
     Components Version:        3.10.1

My serverless.yaml:

service: test-service

plugins:
  - serverless-plugin-typescript
  - serverless-offline
  - serverless-plugin-warmup

provider:
  name: aws
  runtime: nodejs12.x
  lambdaHashingVersion: 20201221
  region: eu-central-1

functions:
  main: # The name of the lambda function
    handler: src/lambda.handler
    events:
      - http:
          method: any
          path: /{any+}

custom:
  warmup:
    officeHoursWarmer:
      enabled: true
      events:
        - schedule: cron(0/5 8-17 ? * MON-FRI *)
      concurrency: 10
    outOfOfficeHoursWarmer:
      enabled: true
      events:
        - schedule: cron(0/5 0-7 ? * MON-FRI *)
        - schedule: cron(0/5 18-23 ? * MON-FRI *)
        - schedule: cron(0/5 * ? * SAT-SUN *)
      concurrency: 1
@juanjoDiaz
Copy link
Owner

Hi @volbrene ,

serverless-typescript-plugin has been problematic since the very beginning. See #240, #85, #149 and #43.

There is an open issue about this in the serverless-typescript-plugin maintainers and it's on their end to solve it: serverless/serverless-plugin-typescript#125

Many users report to have no problem with serverless-webpack and some users try to patch serverless-typescript-plugin
using serverless-plugin-warmup-ts-bridge and serverless-plugin-warmup-ts-bridge-v2.

Hope this helps!

@juanjoDiaz
Copy link
Owner

Closing since there is no response and the solutions already discussed had been provided.
Feel free to reopen if you have any other ideas or needs.

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