-
Notifications
You must be signed in to change notification settings - Fork 416
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
Serverless fails to deploy if packager is yarn
#388
Comments
Hi @ArpitaSrivas that's interesting. Do you know where the "activityTick" entries are coming from? Is Yarn configured differently on your linux system than on macOS? Can you do some tests and figure out, if we need some additional switch to get the linux output the same as on macOS? For me this looks like the output of Additionally, can you post the yarn versions for the systems? Maybe they are different too. |
Hi @HyperBrain, I have tested this in mulitple mac systems where it works fine. Thanks. |
Hi @ArpitaSrivas , honestly I have not really a clue what's happening. Just guessing, it could be something with the environment, the serverless command is executed on the failing linux machine, i.e. that the user account it is executed with, has a different PATH, so that a different (?) yarn executable is run, or that there is some env var set in that case that triggers the strange behavior. |
@ArpitaSrivas Did you find out anything? |
Hi @HyperBrain, I didn't get a chance to look into it further, will try to get back on this soon. |
@ArpitaSrivas Any update here? |
@ArpitaSrivas @HyperBrain Hi i just got hit with this problem as well had to switch back to npm. |
@ArpitaSrivas @HyperBrain I temporarily solved it with two things. Separately, i think you need to add these flags '--no-progress' '--silent' to lib/packagers/yarn.js inside getProdDependencies reading the background it feels like using yarn list --json is problematic but those two flags i think control the extra output. the other issue that it reports those blobs if 'is-ci' returns true. i'm not sure those flags are good enough alone. |
Hi all, I think this may be a bug in the plugin after all. It seems an older version of Yarn used to output a single line of JSON, but subsequent versions now use the Yarn: v1.15.2 |
The change we would likely need to https://github.com/serverless-heaven/serverless-webpack/blob/master/lib/packagers/yarn.js#L61 to implement |
Fix `yarn list --json` stdOut parsing. fixes #388
This is a Bug Report
Unable to deploy serverless, works fine with npm packager but not with yarn, getting the following error with yarn packager:
This issue is not happening on macOS 10.13.4
The build actually fails when the process tries to run
yarn list --depth=1 --json --production
, which is returning multiple objects, as a result JSON.parse is failing.Sample Output:
Additional Data
The text was updated successfully, but these errors were encountered: