Skip to content
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

Support Plug-N-Play (Yarn v2) #5836

Closed
brandon-leapyear opened this issue Dec 1, 2020 · 2 comments
Closed

Support Plug-N-Play (Yarn v2) #5836

brandon-leapyear opened this issue Dec 1, 2020 · 2 comments
Labels
needs triage This issue has not been looked into

Comments

@brandon-leapyear
Copy link

Bug Report

Current behavior

Running tests with yarn version 2 fails with a bunch of errors like

The "@nestjs/platform-express" package is missing. Please, make sure to install this library ($ npm install @nestjs/platform-express) to take advantage of NestFactory.

Yarn version 2 started using the Plug-n-Play API, which prevents packages from require-ing dependencies not explicitly listed in the package's package.json. I'm not sure what the best solution is, but one solution is to add @nestjs/platform-express as a peer dependency for @nestjs/testing. This workaround works for me

# .yarnrc.yml
packageExtensions:
  '@nestjs/testing@*':
    peerDependencies:
      '@nestjs/platform-express': '*'

Input Code

const your = (code) => here;

Expected behavior

Possible Solution

Environment


Nest version: X.Y.Z

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@brandon-leapyear brandon-leapyear added the needs triage This issue has not been looked into label Dec 1, 2020
@brandon-leapyear brandon-leapyear changed the title Play nice with PnP Support Plug-N-Play (Yarn v2) Dec 1, 2020
@brandon-leapyear
Copy link
Author

brandon-leapyear commented Dec 1, 2020

This is an old work account. Please reference @brandonchinn178 for all future communication


Possibly related to: nestjs/nest-cli#899

@kamilmysliwiec
Copy link
Member

We're tracking this here #5477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

2 participants