Util package not found with nodejs_compat flag

Hello -
I have a function inside of /functions within my pages application.
My page build log is producing this error when uploading the functions:

16:37:08.475	  The package "util" wasn't found on the file system but is built into node.
16:37:08.476	  Add the "nodejs_compat" compatibility flag to your Pages project to enable Node.js compatibility.

My function does not need util directly. It’s a dependency for another package I am using.

I added the nodejs_compat flag to my preview and production builds.

At the top of my build log I see this:

Detected the following tools from environment: [email protected], [email protected]

Which makes me think the nodejs compatibility is enabled. But I am unable to get past this error.

Looking for any solution but preferably the best solution =D

1 Like

I ended up finding a different package with no dependencies. Problem solved for now.