Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amplify-nodejs-function-runtime-provider): catch yarn 2 error on lambda build #8263

Merged
merged 1 commit into from
Oct 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ function runPackageManager(cwd: string, buildType?: BuildType, scriptName?: stri
} catch (error) {
if ((error as any).code === 'ENOENT') {
throw new Error(`Packaging lambda function failed. Could not find ${packageManager} executable in the PATH.`);
} else if (error.stdout?.includes('YN0050: The --production option is deprecated')) {
throw new Error(`Packaging lambda function failed. Yarn 2 is not supported. Use Yarn 1.x and push again.`);
} else {
throw new Error(`Packaging lambda function failed with the error \n${error.message}`);
}
Expand Down