require("history").createBrowserHistory` instead of `require("history/createBrowserHistory")`

JavaScript
// history.js

import { createBrowserHistory } from "history";
export default createBrowserHistory(); 
Source

Also in JavaScript: