Bug Report
I have been successfully using serverless in the last spring til May/June (I guess the version was 1.17) and was successfully deploying my project to AWS. After 5-6 months pause I now continue working on the project. However, now my attempt to deploy the project was rejected with various errors. I updated the serverless to its lastest version 1.25.0 as well as the webpack and serverless-webpack plugin as well as npm and node. Now there are no errors given during the deployment but the endpoints and functions are now shown as none.
For bug reports:
What did you expect should have happened?
To see a list of endpoints and functions
What was the config you used?
The following are the parts from serverless.yml and webpack.config.js
+++ serverless.yml +++
service: 111-emu-serverless
plugins:
- serverless-webpack
custom:
webpack: ./webpack.config.js
provider:
name: aws
runtime: nodejs6.10
region: us-west-2
stage: dev
profile: AdminProfile
memorySize: 128
bucket
versionFunctions: false
functions:
check_credentials:
handler: handler.check_credentials
timeout: 20
events:
- http:
path: check_credentials
method: post
cors: true
account:
handler: handler.account
timeout: 60
events:
- http:
path: account
method: post
cors: true
+++ webpack.config.js +++
const webpack = require('webpack');
var path = require('path');
var fs = require('fs');
module.exports = {
entry: './handler.js',
target: 'node',
node: {
__dirname: false,
__filename: false,
},
module: {
rules: [
{
test: /\.json$/,
loader: 'json-loader',
},
{
test: /\.txt$/,
loader: 'file-loader?name=[path][name].[ext]',
},
{
test: /\.bin$/,
loader: 'file-loader?name=[path][name].[ext]',
},
]
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '/.webpack'),
filename: '[name].bundle.js',
},
externals: ['aws-sdk']
};
user@user-VirtualBox ~/projects/111/emu_server/aws/serverless/deploy $ serverless deploy -v
Serverless: Removing /home/user/projects/111/emu_server/aws/serverless/deploy/.webpack
Serverless: Bundling with Webpack...
Time: 1415ms
Asset Size Chunks Chunk Names
bin/certs/srvcerts.txt 117 bytes [emitted]
bin/emu_srv.bin 2.16 MB [emitted] [big]
fw/release/EMU.bin 56.3 kB [emitted]
fw/release/version.txt 15 bytes [emitted]
main.bundle.js 833 kB 0 [emitted] [big] main
Serverless: Zip service: /home/user/projects/111/emu_server/aws/serverless/deploy/.webpack/service [139 ms]
Serverless: Packaging service...
Serverless: Remove /home/user/projects/111/emu_server/aws/serverless/deploy/.webpack
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Validating template...
Serverless: Updating Stack...
Service Information
service: 111-emu-serverless
stage: dev
region: us-west-2
stack: 111-emu-serverless-dev
api keys:
None
endpoints:
None
functions:
None
Stack Outputs
ServerlessDeploymentBucketName: 111-emu-serverl-serverlessdeploymentbuck-qdyidi1wk3zx
Serverless: Removing old service versions...
For feature proposals:
Similar or dependent issues:
*
Serverless Framework Version you're using:
1.25.0
Operating System:
Linux Mint
Stack Trace:
Provider Error messages:
OK, solved.
The problem was in the absence of indentation of function names from the keyword functions: in the yml file:
This was probably not required for older serverless versions.
Most helpful comment
OK, solved.
The problem was in the absence of indentation of function names from the keyword functions: in the yml file:
This was probably not required for older serverless versions.