Can not find modules when using yarn PnP
Describe the bug
When I install dependencies with yarn PnP, It always shown error The @adminjs/express package is missing
But I remove PnP setting and install with node_modules, It works correctly.
[10:07:06] Starting compilation in watch mode...
[10:07:08] Found 0 errors. Watching for file changes.
[Nest] 71630 - 2022. 04. 11. 10:07:10 LOG [NestFactory] Starting Nest application...
[Nest] 71630 - 2022. 04. 11. 10:07:10 LOG [InstanceLoader] AppModule dependencies initialized +21ms
[Nest] 71630 - 2022. 04. 11. 10:07:10 LOG [InstanceLoader] AdminModule dependencies initialized +0ms
[Nest] 71630 - 2022. 04. 11. 10:07:10 LOG [RoutesResolver] AppController {/}: +18ms
[Nest] 71630 - 2022. 04. 11. 10:07:10 LOG [RouterExplorer] Mapped {/, GET} route +2ms
[Nest] 71630 - 2022. 04. 11. 10:07:10 ERROR [PackageLoader] The "@adminjs/express" package is missing. Please, make sure to install this library ($ npm install @adminjs/express) to take advantage of @adminjs/nestjs.
Installed libraries and their versions
- yarn 3.2.0 cjs
- yarn PnP
{
"@adminjs/express": "^4.1.0",
"@adminjs/nestjs": "^4.0.1",
"@adminjs/prisma": "^1.0.3",
"@nestjs/common": "^8.0.0",
"@nestjs/core": "^8.0.0",
"@nestjs/platform-express": "^8.0.0",
"adminjs": "^5.9.8",
"express": "^4.17.3",
"express-formidable": "^1.2.0",
"express-session": "^1.17.2",
"prisma": "^3.12.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0"
}
To Reproduce
- remove
node_modules - run
yarn set version stable - run
yarn install - run
yarn start:dev
Expected behavior The Project will be start correctly
Desktop (please complete the following information if relevant):
- OS: MacOS 12.2.1 (Monterey)
- Browser: Node 16.4
I have the same problem
I am having this issue too, any solution ?
@Taycode i solved it eventually, maybe it can help you if your situation is similar https://stackoverflow.com/questions/76280815/yarn-project-is-using-yarn3x-and-plug-n-play-but-doesnt-work-without-node-modu
not totally similar. The only module it can't find is @adminjs/express despite it being installed
@Taycode ah, then i'm not sure. maybe try yarn cache clean then yarn to install again