-
Notifications
You must be signed in to change notification settings - Fork 4k
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(lambda-nodejs): local parcel not detected #10268
Conversation
Fix Parcel detection for non JS/TS CDK projects. For those projects the module `@aws-cdk/aws-lambda-nodejs` is not installed in a `node_modules` folder inside the project. Change the detection logic to `require.resolve` from the project root. Also in this fix: ensure that the Parcel version that is run inside the container is the one installed at `/`. Previously, if an incorrect version of Parcel was detected bundling would happen in a container as expected but with the incorrect version because project root is mounted at `/asset-input` and in this case it contains the incorrect Parcel version at `/asset-input/node_modules`. Again change the `require.resolve` paths to avoid this.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
fixed the conflict |
@eladb ? |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Fix Parcel detection for non JS/TS CDK projects. For those projects the
module
@aws-cdk/aws-lambda-nodejs
is not installed in anode_modules
folder inside the project.Change the detection logic to
require.resolve
from the project root.Also in this fix: ensure that the Parcel version that is run inside the
container is the one installed at
/
. Previously, if an incorrectversion of Parcel was detected bundling would happen in a container as
expected but with the incorrect version because project root is mounted
at
/asset-input
and in this case it contains the incorrect Parcelversion at
/asset-input/node_modules
. Again change therequire.resolve
paths to avoid this.Addresses #10123 (not sure yet if it closes it)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license