-
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
aws-lambda-nodejs doesn't build if parcel is not installed globally #6204
Comments
I think it might be possible to replace the code with the following:
|
Hi @mattsains, thanks for reporting this and opening up a PR, much appreciated! 👍 |
@jogold can you take a look please? |
@mattsains Can you run |
I agree that there's maybe something to do to improve cross platform compatibility here but I'm not sure I would go with |
Sorry, I think you might be misunderstanding me. I in fact didn't have parcel installed globally, that is the problem. Because the construct is calling spawn, it requires that parcel is installed globally in order for it to work - it's basically trying to execute parcel on $PATH. I have not installed
I don't think this is an "improve cross-platform" issue - have you tried the reproduction steps? Unless I'm missing something, this would be a problem anywhere you haven't installed parcel globally (ie., the majority of users) |
No, I was not able to reproduce. It runs on my machine with a local install of What am I missing? Can you give more details about your environment? |
Here is my
Could you post yours? |
I think that I'm starting to understand I'm using Let's continue the discussion in the PR to find the right fix. |
I think because of this line, parcel needs to be installed globally for aws-lambda-nodejs to build.
Reproduction Steps
Take a working app containing a aws-lambda-nodejs construct.
Run
npm remove -g parcel
Run
cdk synth
on the app. The command fails with:Error Log
See above
Environment
Other
I think you need to reference the binary as a dependency, similar to how npx works, rather than invoking spawn
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: