xenophobic-harlequin
xenophobic-harlequin3y ago

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
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?
1 Reply
Oleg V.
Oleg V.3y ago
Hey. I passed your question to our engineering team. They are asking about for a complete reproduction. They'll be happy to give it a try, but they don't have any suggestions without that.

Did you find this page helpful?