You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: createLocation is deprecated; use history.createLocation instead
In the clientside code this was easy to fix
const history = require('history');
const historyObj = history.createHistory();
historyObj.createLocation(....)
When you try to run this code with express you will get the following error
[1] [piping] error given was: Error: Invariant Violation: Browser history needs a DOM
[1] at Object.invariant [as default] (/var/www/webapp/node_modules/history/node_modules/invariant/invariant.js:44:15)
[1] at Object.createBrowserHistory [as createHistory] (/var/www/webapp/node_modules/history/lib/createBrowserHistory.js:35:25)
[1] at Object.<anonymous> (/var/www/webapp/src/server.js:5:28)
[1] at Module._compile (module.js:434:26)
[1] at normalLoader (/var/www/webapp/node_modules/babel-core/lib/api/register/node.js:199:5)
[1] at Object.require.extensions.(anonymous function) [as .js] (/var/www/webapp/node_modules/babel-core/lib/api/register/node.js:216:7)
[1] at Module.load (module.js:355:32)
[1] at Module._load (module.js:310:12)
[1] at Function.module._load (/var/www/webapp/node_modules/piping/lib/launcher.js:32:16)
[1] at Module.require (module.js:365:17)
[1] [piping] further repeats of this error will be suppressed...
So how can we use createLocation with express?
The text was updated successfully, but these errors were encountered:
I am using the latest history version
With Express i am getting the following warning
In the clientside code this was easy to fix
When you try to run this code with express you will get the following error
So how can we use createLocation with express?
The text was updated successfully, but these errors were encountered: