Closed yansern closed 6 years ago
@yansern Hi. Thank you for the report.
Did you upgrade from a previous version of Docusaurus or was this a fresh install?
@JoelMarcey I did an upgrade. Changing back to 1.1.5 and I can run again! I’ll dig into HeaderNav.js later on 1.2.0 to see if I can find out what exactly went wrong.
Hi @yansern - can you provide me the exact commands you used when you made the update so I can try to reproduce here? Were you on 1.1.5 when you made this upgrade?
I have same problem.
"dependencies": {
- "docusaurus": "1.1.5"
+ "docusaurus": "1.2.0"
},
$ docusaurus-start
Docusaurus server started on port 3000
LiveReload server started on port 35729
TypeError: utils.getPath is not a function
@shoota @yansern -- are you using npm
or yarn
to do the upgrade? I just tried an upgrade on a site that was on Docusaurus 1.0.9 to 1.2.0, and it worked flawlessly.
I used yarn
.
Very interesting. Thanks. What version were you upgrading from? And did you just run yarn upgrade
from the website directory?
Sorry..., I solved this with runningyarn upgrade
in website directory.
I ran yarn clean && yarn install
.And my repository is mono-repository with yarn workspace and lerna.
Thanks, @JoelMarcey !!
@shoota 👍 Great!
Let me know if you can land https://github.com/userdive/agent.js/pull/641 successfully.
@yansern Did you use yarn
when you ran into this issue? If so, did you run yarn upgrade
in the website
directory too? If not, can you try that to see if you have success like @shoota. Thanks!
I am going to close this out now. https://docusaurus.io/docs/en/next/installation#updating-your-docusaurus-version should hopefully provide the right way to upgrade.
jfyi, for me reason was babel cache. If you are experiencing same issue, try clear your temporary directory or run docusaurus with BABEL_DISABLE_CACHE=1 env configuration
Thanks @anru ... 👍
Are you willing to create a PR to update the installation documentation to add your findings as a note?
Adding a note to https://github.com/facebook/Docusaurus/blob/master/docs/getting-started-installation.md#updating-your-docusaurus-version
@JoelMarcey done
Is this a bug report?
Yes
Have you read the Contributing Guidelines on issues?
Yes
Environment
NodeJS v8.11.2 (LTS) Yarn v1.7.0 Docusarus v1.2.0
Steps to Reproduce
^1.2.0
.yarn install
to install new version.yarn start
.Then you'll get:
TypeError: utils.getPath is not a function at HeaderNav.makeLinks (C:/_PATH_REMOVED_/node_modules/docusaur us/lib/core/nav/HeaderNav.js:196:15)