Skip to content

Commit

Permalink
add more descriptive error
Browse files Browse the repository at this point in the history
  • Loading branch information
swyxio authored Jul 25, 2019
1 parent 3115c1b commit 42c6e1f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
`
);
Expand Down

0 comments on commit 42c6e1f

Please sign in to comment.