Netlify Functions and PNPM

Hi!

Are Netlify Functions supposed to work if PNPM is used as the primary package manager?

I’m trying normal way and also esbuild and both give me different kinds of errors.

I’m only doing these two imports

import { builder } from '@netlify/functions';
import chromium from 'chrome-aws-lambda';

And depends whether I set esbuild to true or if I use external_node_modules I get different kinds of errors. Either the module is not found at all (Could not find module X) or I get other error like

[ERROR] Do not know how to load path: node_modules/.pnpm/yargs@17.7.1/node_modules/yargs/yargs

Is this a known issue?

Is it possible to use PNPM for the main project and use NPM for The Netlify Functions?

THANKS!

Have you tried the flag mentioned here: Manage build dependencies | Netlify Docs?

If yes, mind sharing a minimal reproduction repo of the issue?