You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
babel-runtime sometimes includes the node_modules and other directories when it shouldn't #13
The babel-runtime is awesome (and much easier to test code with than the optimizer-plugin). However, after migrating to the babel-runtime, I noticed that my lambdas are significantly larger than with the optimizer plugin.
In one instance, my lambda was around 210 KB with the optimizer and became over 6 MB when using the babel runtime. After investigation, it appears to be because the babel runtime was including the node_modules and some other directories (like coverage and test reports) generated by my build process. When I manually remove the extra directories and deploy, the lambda still runs fine, so these are not needed and should be excluded by default.
I am having difficulties with this as well. I have noticed my _meta/_tmp directory will get up to 250MB. Which is odd because my whole project directory including node_modules and source control is only 48MB.
It seems to make a copy of every file and directory: .git, test, node_modules.
This prevents me from deploying. I get this error message:
Serverless: Deploying functions in "dev" to the following regions: us-west-2
Serverless: ------------------------
Serverless: Failed to deploy the following functions in "dev" to the following regions:
Serverless: us-west-2 ------------------------
Serverless: auth-login: ENOSPC: no space left on device, write
UPDATE:
I tracked my problem down to my file structure which was setup like this:
This was a problem because my s-function.json had the handler set as auth/login/handler.handler and was including everything in the root of my project like the node_modules and was recursively including the _meta directory. This was causing an infinite loop ending up with a mega directory like _meta/_tmp/_meta/_tmp/_meta/_tmp forever.
I was able to resolve my issue by modifying my project structure to to include a parent directory to hold all handler required code.
Activity
joelnet commentedon Apr 10, 2016
I am having difficulties with this as well. I have noticed my _meta/_tmp directory will get up to 250MB. Which is odd because my whole project directory including node_modules and source control is only 48MB.
It seems to make a copy of every file and directory: .git, test, node_modules.
This prevents me from deploying. I get this error message:
UPDATE:
I tracked my problem down to my file structure which was setup like this:
This was a problem because my s-function.json had the
handlerset asauth/login/handler.handlerand was including everything in the root of my project like thenode_modulesand was recursively including the _meta directory. This was causing an infinite loop ending up with a mega directory like _meta/_tmp/_meta/_tmp/_meta/_tmp forever.I was able to resolve my issue by modifying my project structure to to include a parent directory to hold all handler required code.