How do you get the current path in Pages?

It looks like __dirname causes a 500 execption.
There is no wrangler file for Pages to set the Node JS compatibility to use path.resolve()
Was this page helpful?