It runs fine with npm start but error occurs when running with npm run dev:ssr
npm start
npm run dev:ssr