Skip to content

Commit 42c6e1f

Browse files
authored
add more descriptive error
1 parent 3115c1b commit 42c6e1f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: lib/build.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ function webpackConfig(dir, {userWebpackConfig, useBabelrc} = {}) {
5454
if (dirPath === functionsPath) {
5555
throw new Error(
5656
`
57-
netlify-lambda Error: Function source folder (specified in netlify-lambda serve/build command)
58-
and publish folder (specified in netlify.toml)
59-
should be different.
57+
netlify-lambda Error: Function source folder (specified in netlify-lambda serve/build command) and publish folder (specified in netlify.toml)
58+
should be different. They are both set to ${dirPath}.
59+
60+
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".
6061
For more info, check https://github.com/netlify/netlify-lambda#usage
6162
`
6263
);

0 commit comments

Comments
 (0)