question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support yarn 2 version

See original GitHub issue

Add support for Yarn 2.*

Description

For bug reports:

  • What went wrong? Running sls package with yarn 2.22.2 results in error:
Error: yarn install --frozen-lockfile --non-interactive failed with code 1
  • What did you expect should have happened? Build package without any errors

  • What was the config you used?

    webpack:
        webpackConfig: ./buildWebpackConfig.js
        includeModules: true
        packager: 'yarn'
        excludeFiles: src/**/__tests__/*
  • What stacktrace or error message from your provider did you see?

For feature proposals:

Update this command https://github.com/serverless-heaven/serverless-webpack/blob/38135e4443c7d7e8506010f0c3e411220abe6f24/lib/packagers/yarn.js#L120

So it will executed succesfully with yarn 2.* version. Example: yarn install --immutable --immutable-cache https://yarnpkg.com/cli/install

Additional Data

  • Serverless-Webpack Version you’re using: 5.3.5
  • Webpack version you’re using: 4.29.6
  • Serverless Framework Version you’re using: 1.74.1
  • Operating System: darwin
  • Stack Trace (if available):
  Error: yarn install --frozen-lockfile --non-interactive failed with code 1
      at ChildProcess.<anonymous> (/Users/user/projects/lambda/node_modules/serverless-webpack/lib/utils.js:91:16)
      at ChildProcess.emit (events.js:223:5)
      at ChildProcess.EventEmitter.emit (domain.js:475:20)
      at maybeClose (internal/child_process.js:1021:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:23
  • Comments:31 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
AwolDescommented, Jan 22, 2022

@mrowles I ended up setting the version yarn uses for this project back to v1.22 to get it working 🤷‍♂️ not an ideal solution.

3reactions
AwolDescommented, Dec 30, 2021

Bump on this - I’m running into this too with yarn version 3.1.0 & latest serverless-webpack version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration | Yarn - Package Manager
Run npm install -g yarn to update the global yarn version to latest v1; Go into your project directory; Run yarn set version...
Read more >
Yarn 2 — the future of package managers for JavaScript? - Snyk
Node.js versions prior to 10 are not supported anymore and so no bug fixes, and no security fixes. Switching to the new Yarn...
Read more >
Introducing Yarn 2 ! - DEV Community ‍ ‍
The colours are now used to support the important parts of each message, usually the package names and versions, rather than on a...
Read more >
Migrating to Yarn 2 - Heroku Dev Center
This article is intended to help current Heroku users migrate from Yarn 1 to Yarn 2. Apps being migrated should already be using...
Read more >
It's 2021, and You Should Switch to Yarn 2 - Atomic Spin
Version 2 of the popular JavaScript package manager Yarn has been ... But with node_modules/ support added back in, Yarn 2 now provides...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found