Missing 'uid' dependency in @nestjs/core when using Yarn 3 with PnP
envgap__nestjs__nest-11068
01 / FAILURE SIGNATURE
As reported upstream
Error: @nestjs/core tried to access uid, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
67a58e9b85a6dc6980821f1176710ccae813f96a- Manifest
packages/core/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
nestjs/nest #11068 · read the original issue
### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior After installing version 9.3.3 the application refuses to start due to missing dependency to 'uid' that is imported in the `core` ([this commit](https://github.com/nestjs/nest/commit/d323edbab9b1f92bb4ef661bb5dd5caee2cce553)). Issue exists with Yarn 3.4.1 PnP (no node_modules), it seems to work with NPM and Yarn 1 Error details: ``` Error: @nestjs/core tried to access uid, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. Required package: uid Required by: @nestjs/core@virtual:4d838bdb49fccefaff67921c21bdcd7867660cc901b0a9ffea78a4ff18ed68032624b8a4dcb1efb3d528bae975979fb0349c371ac1f171997fad3559da096bf8#npm:9.3.3 (via /project/home/jpogorzelski/workspace/.yarn/unplugged/@nestjs-core-virtual-0d2c6d3b58/node_modules/@nestjs/core/injector/) ``` To resolve this, the 'uid' dependency needs to be added to the package.json located in the core module. ### Minimum reproduction code https://codesandbox.io/p/sandbox/heuristic-pare-u8hpj3 ### Steps to reproduce 1. yarn install 2. yarn start:dev ### Expected behavior The app should start without errors, the uid dependency is resolved properly. ### Package - [ ] I don't know. Or some 3rd-party package - [ ] <code>@nestjs/common</code> - [X] <code>@nestjs/core</code> - [ ] <code>@nestjs/microservices</code> - [ ] <code>@nestjs/platform-express</code> - [ ] <code>@nestjs/platform-fastify</code> - [ ] <code>@nestjs/platform-socket.io</code> - [ ] <code>@nestjs/platform-ws</code> - [ ] <code>@nestjs/testing</code> - [ ] <code>@nestjs/websockets</code> - [ ] Other (see below) ### Other package _No response_ ### NestJS version 9.3.3 ### Packages versions ``` [System Information] OS Version : Linux 5.15 NodeJS Version : v16.17.0 YARN Version : 3.4.1 [Nest CLI] Nest CLI Version : 9.2.0 [Nest Platform Information] platform-express version : 9.3.3 schematics version : 9.0.4 testing version : 9.3.3 common version : 9.3.3 core version : 9.3.3 cli version : 9.2.0 ``` ### Node.js version v16, v18 ### In which operating systems have you tested? - [ ] macOS - [ ] Windows - [X] Linux ### Other _No response_
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]