This builds off of @timneutkens's PR instead of updating it because it's his `canary` branch. Updated to still `stat`, as it's the only way to test the difference between a file and directory. --- Closes #13506 Fixes #12235
* Replace deprecated fs.exists with fs.access. * Update packages/next/lib/file-exists.ts Co-Authored-By: Joe Haddad <timer150@gmail.com> * Update packages/next/lib/file-exists.ts Co-Authored-By: Joe Haddad <timer150@gmail.com>