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.

I tried to use serveless-bundle with yarn 2. Unfortunally I get the following error running yarn test:

➤ YN0000: Error: serverless-bundle tried to access resolve, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
➤ YN0000: 
➤ YN0000: Required package: resolve (via "resolve")
➤ YN0000: Required by: serverless-bundle@npm:1.9.1 ...

Yarn 2 needs all the dependencies to be listed in your package.json and it appears that resolve isn’t. resolve is used in https://github.com/AnomalyInnovations/serverless-bundle/blob/c955b72b3216d4fa2e64a9a4b86bd4dbe1fd9473/scripts/test.js#L39

Edit: I made a repo: https://github.com/darkship/serverless-bundle-test You can fix it locally with packageExtensions in your .yarnrc.yml

    "serverless-bundle@*":
      dependencies:
        resolve: "*"

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jayaircommented, Nov 13, 2020

Nvm, I’m working on it now. I’ll put the import-fresh change in. I’ll put out a new release shortly. Then you can test it with Yarn 2 and let me know.

0reactions
jayaircommented, Nov 13, 2020

@francisu Yup that looks like a mistake on our side. Please open a PR (if you haven’t already, I haven’t checked all my notifications yet).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration | Yarn - Package Manager
A step-by-step and in-depth migration guide from Yarn 1 (Classic) to Yarn 2 (Berry).
Read more >
Migrating to Yarn 2 - Heroku Dev Center
Heroku users using Yarn are not required to migrate to Yarn 2, and users will have access to Yarn 1 in their apps...
Read more >
Migrating our Monorepo to Yarn 2 | DoltHub Blog
How we migrated our monorepo · 1. Install yarn · 2. Add .yarnrc to web · 3. Commit changes and run yarn install...
Read more >
It's 2021, and You Should Switch to Yarn 2 - Atomic Spin
The list of popular frontend JS tools that natively support PnP is long and growing. 2. Difficulty Migrating from Yarn 1.x. The PnP ......
Read more >
Yarn 2 support · Issue #3201 · nrwl/nx - GitHub
Description Requesting support to use with yarn 2. Currently I see issues like this when I try to run nx through yarn 2...
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