rubber-blueR
Apify & Crawlee3y ago
1 reply
rubber-blue

How to install crawlee with yarn2 and pnp in a workspace ?

I have a monorepo that gathers several small projects. It uses yarn2 (zero install) and workspace.
I wanted to add a package that uses crawlee, but I get a lot of errors at startup
yarn start:dev
 .
After some research and specifying the
nodeLinker: node_modules
in the .yarnrc.yml file of the package, this solved the problem.

I have this structure:
bash 
.
├── .yarn
│   ├── cache
│   └── ...
├── package.json
├── packages
│   ├── pkg-1
│   ├── pkg-2
│   └── pkg-3 # with crawlee
├── tsconfig.json
├── vitest.workspace.ts
└── yarn.lock


But it's a pain because I have to manage the crawlee package separately from the others, and I don't use the yarn2 cache, ...
Is there any way to make the crawlee package compatible with pnp?
Was this page helpful?