Closed userdocs closed 1 year ago
This should be fixed in the latest 1.0.0-rc.2
version.
Hi @tsironis ,
I'm using version 1.0.0 and I'm still seeing this error. The links on the glossary page simply point to http://docs/terms/{file name}. This problem is not there on the regular pages. Clicking on one of the links shows the following error:
Uncaught runtime errors:
×
ERROR
Failed to execute 'pushState' on 'History': A history state object with URL 'http://docs/terms/{file name}' cannot be created in a document with origin 'http://localhost:3000' and URL 'http://localhost:3000/docs/glossary'.
at eval (webpack-internal:///./node_modules/history/esm/history.js:372:23)
at Object.confirmTransitionTo (webpack-internal:///./node_modules/history/esm/history.js:157:9)
at push (webpack-internal:///./node_modules/history/esm/history.js:365:23)
at navigate (webpack-internal:///./node_modules/react-router-dom/esm/react-router-dom.js:221:9)
at onClick (webpack-internal:///./node_modules/react-router-dom/esm/react-router-dom.js:176:11)
at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:3945:14)
at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:3994:16)
at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4056:31)
at invokeGuardedCallbackAndCatchFirstError (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4070:25)
at executeDispatch (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:8243:3)
ERROR
Failed to execute 'pushState' on 'History': A history state object with URL 'http://docs/terms/{file name}' cannot be created in a document with origin 'http://localhost:3000' and URL 'http://localhost:3000/docs/glossary'.
at eval (webpack-internal:///./node_modules/history/esm/history.js:372:23)
at Object.confirmTransitionTo (webpack-internal:///./node_modules/history/esm/history.js:157:9)
at push (webpack-internal:///./node_modules/history/esm/history.js:365:23)
at navigate (webpack-internal:///./node_modules/react-router-dom/esm/react-router-dom.js:221:9)
at onClick (webpack-internal:///./node_modules/react-router-dom/esm/react-router-dom.js:176:11)
at HTMLUnknownElement.callCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:3945:14)
at Object.invokeGuardedCallbackDev (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:3994:16)
at invokeGuardedCallback (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4056:31)
at invokeGuardedCallbackAndCatchFirstError (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:4070:25)
at executeDispatch (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:8243:3)
Is there a workaround for this?
Ahh I just noticed that it seems to only not work when developing on localhost. After deploying everything is fine.
Sorry, i meant to provide a comment before posting. With this config,
The generated glossary is using the default URLS and not my baseUrl which means they don't resolve. I did see this
https://github.com/grnet/docusaurus-terminology/blob/e432ace33b144d5e5e7bd08f35a0fc207982f588/plugins/docusaurus-terminology/index.js#L21
It looks like it should, right?