From 42c6e1fb0a5bd86913403a09243ac6bb9e229d1c Mon Sep 17 00:00:00 2001 From: swyx Date: Thu, 25 Jul 2019 11:51:15 -0400 Subject: [PATCH] add more descriptive error --- lib/build.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/build.js b/lib/build.js index f0b126f9..eea3278b 100644 --- a/lib/build.js +++ b/lib/build.js @@ -54,9 +54,10 @@ function webpackConfig(dir, {userWebpackConfig, useBabelrc} = {}) { if (dirPath === functionsPath) { throw new Error( ` - netlify-lambda Error: Function source folder (specified in netlify-lambda serve/build command) - and publish folder (specified in netlify.toml) - should be different. + netlify-lambda Error: Function source folder (specified in netlify-lambda serve/build command) and publish folder (specified in netlify.toml) + should be different. They are both set to ${dirPath}. + + This is a common mistake for people switching from Netlify Dev to netlify-lambda. For an easy fix, change your functions key inside netlify.toml to something else, like "functions-build". For more info, check https://github.com/netlify/netlify-lambda#usage ` );