I’ve spelunked around Cloudflare’s docs and various forums, but can’t seem to find an answer elsewhere. I use yarn workspaces in a monorepo and my builds fail with the following error:
npm ERR! code EUNSUPPORTEDPROTOCOL npm ERR! Unsupported URL Type "workspace:": workspace:*
I’ve specified my package manager as
"packageManager": "[email protected]" in package.json and have set the NODE_VERSION and YARN_VERSION env variables (“16.15.1” and “3.2.1”, respectively) and Cloudflare still defaults to
npm install instead of yarn. Yarn is available and works correctly in subsequent steps such as
yarn build if I disable workspaces to get through the npm stage, but the build ultimately fails to find the files needed since the “workspace:*” links are essential for sharing internal packages.
Everything builds and compiles locally with my existing yarn setup, so there is likely a configuration step I’m missing or is incorrectly implemented, so any suggestions would be greatly appreciated.