Repository navigation
Description
This is a Bug Report
Description
When upgrading to 1.39.0 we started receiving an error indicating that the package can not be found in the path. This had been working up until this morning when we updated our docker container
ERROR
Serverless: Invoke aws:common:moveArtifactsToTemp
Serverless Error ---------------------------------------
No app.zip file found in the package path you provided.
Serverless.yml file
custom:
projectName: '${env:PROJECT}'
uServiceName: '${env:PROJECT}-tfn-query'
apiVersion: 'v3'
tftTableName: '${env:PROJECT}-tft'
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
service:
${self:custom.uServiceName}
plugins:
- serverless-webpack
package:
individually: true
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
deploymentBucket: somos-${env:PROJECT}
stackName: ${self:custom.uServiceName}
apiName: ${self:custom.projectName}
apiGateway:
restApiId:
Fn::ImportValue: ${env:PROJECT}-RestApiId
restApiRootResourceId:
Fn::ImportValue: ${env:PROJECT}-RootResourceId
restApiResources:
v3:
Fn::ImportValue: ${env:PROJECT}-TSSBase
environment:
TFT_TABLE_NAME: ${self:custom.tftTableName}
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:BatchGetItem
Resource:
Fn::ImportValue: ${self:custom.tftTableName}
functions:
app:
name: ${self:service}
handler: index.handler
events:
- http:
path: ${self:custom.apiVersion}/tfn-query/{param+}
method: get
cors: true
serverless-state.json file package statement
"package": {
"individually": true,
"artifactDirectoryName": "serverless/tss-modern-dev-tfn-query/dev/1552697931704-2019-03-16T00:58:51.704Z",
"artifact": ""
Similar or dependent issues:
Additional Data - we had some nodes not using the package statement and they worked
-
Serverless Framework Version you're using: 1.39.0
-
Operating System: alpine linux
-
Stack Trace:
Serverless: [AWS s3 200 0.102s 0 retries] getBucketLocation({ Bucket: 'somos-tss-modern-dev' })
Serverless: Invoke aws:common:moveArtifactsToTemp
Serverless Error ---------------------------------------
No app.zip file found in the package path you provided.
Stack Trace --------------------------------------------
ServerlessError: No app.zip file found in the package path you provided.
at serverless.service.getAllFunctions.forEach.functionName (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/lib/extendedValidate.js:70:17)
at Array.forEach ()
at AwsDeploy.extendedValidate (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/lib/extendedValidate.js:58:49)
From previous event:
at AwsDeploy.BbPromise.bind.then.then.then (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:84:14)
From previous event:
at Object.before:deploy:deploy [as hook] (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:78:10)
at BbPromise.reduce (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:408:55)
From previous event:
at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:408:22)
at PluginManager.run (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:439:17)
at variables.populateService.then (/usr/lib/node_modules/serverless/lib/Serverless.js:106:33)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:120:23)
From previous event:
at Serverless.run (/usr/lib/node_modules/serverless/lib/Serverless.js:93:6)
at serverless.init.then (/usr/lib/node_modules/serverless/bin/serverless:43:28)
at /usr/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
at /usr/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqWrap.oncomplete (fs.js:141:20)
From previous event:
at initializeErrorReporter.then (/usr/lib/node_modules/serverless/bin/serverless:43:6)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:120:23)
From previous event:
at /usr/lib/node_modules/serverless/bin/serverless:28:46
at Object. (/usr/lib/node_modules/serverless/bin/serverless:67:4)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:282:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3) -
Provider Error messages:
Activity
monkeyboy64 commentedon Mar 16, 2019
I ran into this same error on a circleci build. I didn't hit it on my windows machine though.
Kennytian commentedon Mar 16, 2019
My workaround is downgrade to 1.38.0,
yarn global add [email protected]softprops commentedon Mar 16, 2019
I believe I found the bug while debugging the serverless rust plugin softprops/serverless-rust#30 (comment)
the path the
package.artifactused in 1.38.0 was previously relative to the root of a serverless project, in 1.39.0 is is now an absolute path rooted to the .serverless directory.The error message could likely be improved to be more than the file name and include the path serverless is tried to resolve it from.
In the meantime, can we confirm this was an intentional change or do plugins need accommodate old and new serverless versions with the breaking change?
softprops commentedon Mar 16, 2019
I'm back through recent pulls. #5297 looks suspect
Downgrade serverless to 1.38.0 to workaround an open issue
alfaproject commentedon Mar 17, 2019
I've just hit this issue or similar when running the
deploycommand:ENOENT: no such file or directory, stat '/Users/alfa/Documents/Projects/my-company/my-project/packages/my-lambda/.serverless/.serverless/my-lambda.zip'That
/.serverless/.serverlesslooks suspicious.janpoltan commentedon Mar 18, 2019
I have this issue also in 1.39.0
Downgraded to
1.38.0to make it work in CircleCI build scriptpmuens commentedon Mar 18, 2019
Just reverted #4188 which seems to be the root cause. Patch release should be out in ~30 minutes...
dattatrayhkulkarni commentedon Mar 20, 2019
I also faced a similar issue. After I downgraded the serverless framework to 1.38.0 it worked.
npm install -g [email protected]
softprops commentedon Mar 20, 2019
The patch release 1.39.1 resolved the issue for me
debugguru commentedon Jan 8, 2021
Hello,
Has this issue regressed? I am seeing exact error with package. started noticing this error after we added layers
I am on following version
Framework Core: 2.18.0
Plugin: 4.4.2
SDK: 2.3.2
Components: 3.4.5