-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Path error with SLS 1.18 when package individually is set #159
Comments
Hi @kikar . Thanks for the report 👍 . Does this only happen when you try to run the "batched" deployments with the for loop, or does it also happen if you try to deploy a single project with CodeBuild? |
Happening on local as well, even with single project. const { join } = require('path');
module.exports = {
entry: {
getUsers: './getUsers.ts'
},
target: 'node',
module: {
loaders: [
{ test: /\.ts(x?)$/, loader: 'ts-loader' }
]
},
resolve: {
extensions: ['.ts', '.js']
},
output: {
path: join(__dirname, '.webpack'),
libraryTarget: 'commonjs',
filename: '[name].js'
}
} Output of
My serverless.yml # For full config options, check the docs:
# docs.serverless.com
service: secondTest
frameworkVersion: ">=1.0.0 <2.0.0" # Serverless version
provider:
name: aws
runtime: nodejs6.10
region: eu-west-1
memorySize: 128 # RAM of function
stage: dev
timeout: 3 # Max number of seconds the function can run for
plugins:
- serverless-webpack # Compile functions with Webpack
package:
individually: true # Package each function separately
functions:
getUsers:
handler: getUsers.handler
events:
- http:
path: users
method: get
cors: true
Also, I changed the script to a bash one, easier to write and manage: #!/bin/bash
cd src
for d in */ ; do
if [ "$d" != "lib/" ]; then
cd $d
echo "Deploying $d"
sls package
cd ..
fi
done |
The error happens in the cleanup when This maybe related to #120 - individual packaging does not work properly. We should try to setup a simple project where it can be reproduced locally and then it should be solved together with #120. |
I'm having this problem as well. I don't think it's a CodeBuild issue. Can we rename the issue? I don't know if this is going to help. My project was working well on |
@dashmug Oh. Then it might be something related to changes in Serverless 1.18. Regarding a proper name for the issue, I'd first want to clarify with the Serverless team if it is known there. @pmuens Is there anything known on the Serverless side about such an issue? If yes, could you please post a reference here? |
@HyperBrain thanks for asking. 🤔 the only thing I can think of right now is the problem with the dev dependency exclusion which has a known bug. Don't know if it's related here though (serverless/serverless#3972). Other than that there's serverless/serverless#3978 you've already linked to. |
I am not sure if I am having the same issue but I can't seem to create multiple entry points.
My webpack 2 config is:
Based on webpack docs I should be able to pass an object as the entry and the keys will be used to name the files. |
Turns out I was missing the output section |
I might have found the issue at line 24 and 27. |
Hey @kikar , thanks for the PR 👍 . I will check it tomorrow - and target it for 2.1.0, so that we can get it out asap. |
I didn't try my fix for earlier version, but I checked the bug was present on both versions. |
I already added the 2.1.0 milestone to the issue. You do not have to do anything on your side ;-) |
Nice. When do you think is it gonna get published? |
as soon as I merged #130 I will prepare the release. Think it will be tomorrow. |
This is a Bug Report
Description
I have a few services in the same project, so I made a script to gather the and deploy them one by one. On my machine everything goes fine, but when I run it on AWS CodeBuild, our CI, it fails.
And here is the error:
The text was updated successfully, but these errors were encountered: