v10 testing package is incompatible with yarn PnP due to cross-package relative import #12106
Closed
3 of 15 tasks
Labels
needs triage
This issue has not been looked into
Is there an existing issue for this?
Current behavior
When upgrading the
@nestjs/*
packages to version 10, everything works fine in projects using classic yarn. However, with yarn berry and plug'n'play, there no longer is anode_modules
folder and we get the following typescript compiler error:Both files import from the
@nestjs/core
package via a relative path (import { ModuleDefinition } from '../../core/interfaces/module-definition.interface';
) rather than via the package name, which only works with anode_modules
folder.Minimum reproduction code
https://github.com/alexanderbartl/nestjs-import-error-minimal
Steps to reproduce
yarn set version berry
Expected behavior
tsc
compiles successfully.Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
10.1.0
Packages versions
Node.js version
No response
In which operating systems have you tested?
Other
Note: I haven't checked if there are any other parts of the codebase using relative cross-package imports, but the ones in the testing package are the only ones reported in my projects.
The text was updated successfully, but these errors were encountered: