serverless: ENOENT: no such file or directory, stat '/github/workspace/.build/.serverless'

After release 2.37.0 I’m getting following error when building my project on Github Actions: ENOENT: no such file or directory, stat '/github/workspace/.build/.serverless'. This wasn’t a problem before release 2.36.0 yearlier today, but this release caused me other building issues reported in here. My suspicion is that something was changed in one of these releases that is breaking my build.

serverless.yml

service: xxx

plugins:
  - serverless-dotenv-plugin
  - serverless-plugin-typescript
  - serverless-offline

useDotenv: true

provider:
  name: aws
  lambdaHashingVersion: xxx
  runtime: nodejs12.x
  stage: dev
  region: xxx
  apiGateway:
    shouldStartNameWithService: true
  environment:
    ...
  vpc:
    ...
  logs:
   ...
functions:
  ...

⚠️⚠️ REPLACE WITH FULL COMMAND NAME output
Serverless: Deprecation warning: Variables resolver reports following resolution errors:
              - Cannot resolve variable at "provider.environment.REDIS_DB": Value not found at "env" source,
              - Cannot resolve variable at "provider.environment.REDIS_PORT": Value not found at "env" source,
              - Cannot resolve variable at "provider.environment.REDIS_HOST": Value not found at "env" source,
              - Cannot resolve variable at "provider.environment.API_KEY_FACADE": Value not found at "env" source
            From a next major this will be communicated with a thrown error.
            Set "variablesResolutionMode: 20210326" in your service config, to adapt to new behavior now
            More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: DOTENV: Loading environment variables from .env:
Serverless: 	 - REFETCH_FREQUENCY
Serverless: 	 - SHORT_LENGTH
Serverless: 	 - LONG_LENGTH
Serverless: 	 - API_KEY_LENGTH
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
             - ServerlessOffline for "apiKey", "corsAllowHeaders", "corsAllowOrigin", "corsDisallowCredentials", "corsExposedHeaders", "disableCookieValidation", "enforceSecureCookies", "hideStackTraces", "host", "httpPort", "httpsProtocol", "lambdaPort", "noPrependStageInUrl", "noAuth", "ignoreJWTSignature", "noTimeout", "prefix", "printOutput", "resourceRoutes", "useChildProcesses", "useWorkerThreads", "websocketPort", "webSocketHardTimeout", "webSocketIdleTimeout", "useDocker", "layersDir", "dockerReadOnly", "functionCleanupIdleTimeSeconds", "allowCache"
            Please report this issue in plugin issue tracker.
            Starting with next major release, this will be communicated with a thrown error.
            More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: Packaging service...
Serverless: Excluding development dependencies...
 
 Error ---------------------------------------------------
 
  Error: ENOENT: no such file or directory, stat '/github/workspace/.build/.serverless'
 
     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:          linux
     Node Version:              14.16.1
     Framework Version:         2.37.0 (local)
     Plugin Version:            4.5.3
     SDK Version:               4.2.2
     Components Version:        3.8.3

Installed version

Serverless: Running "serverless" installed locally (in service node_modules)
Framework Core: 2.37.0 (local)
Plugin: 4.5.3
SDK: 4.2.2
Components: 3.8.3

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Hello @adamlass - we’ve released 2.37.1 that should address that issue (https://github.com/serverless/serverless/blob/master/CHANGELOG.md#2371-2021-04-21)

@pgrzesik - So I have tested it now, and everything seems to work as before 2.36.0! Again, thank you for looking into the issue! 🥳

Hi guys, FYI I try with serverless@2.32.1 and it worked. 👯

Yes, i was even able to go up to 2.35.0, but its not ideal 😃

Hi guys, FYI I’ve tried with serverless@2.32.1 and it worked. 👯

@adamlass got the same error too.

Hello @adamlass, thanks for reporting - do you have the ability to run the command with SLS_DEBUG=* env var for more extensive output log? That would help out with debugging 🙇