Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"utils.getPath is not a function" on v1.2.0. #759

Closed
yansern opened this issue Jun 11, 2018 · 14 comments
Closed

"utils.getPath is not a function" on v1.2.0. #759

yansern opened this issue Jun 11, 2018 · 14 comments

Comments

@yansern
Copy link

yansern commented Jun 11, 2018

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. Update docusaurus version in package.json to ^1.2.0.
  2. Run yarn install to install new version.
  3. Run 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)

@JoelMarcey
Copy link
Contributor

@yansern Hi. Thank you for the report.

Did you upgrade from a previous version of Docusaurus or was this a fresh install?

@yansern
Copy link
Author

yansern commented Jun 11, 2018

@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.

@JoelMarcey
Copy link
Contributor

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?

@shoota
Copy link

shoota commented Jun 12, 2018

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

@JoelMarcey
Copy link
Contributor

@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.

@shoota
Copy link

shoota commented Jun 12, 2018

I used yarn.

@JoelMarcey
Copy link
Contributor

Very interesting. Thanks. What version were you upgrading from? And did you just run yarn upgrade from the website directory?

@shoota
Copy link

shoota commented Jun 12, 2018

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 !!

@JoelMarcey
Copy link
Contributor

@shoota 👍 Great!

Let me know if you can land userdive/agent.js#641 successfully.

@JoelMarcey
Copy link
Contributor

@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!

@JoelMarcey
Copy link
Contributor

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.

@anru
Copy link
Contributor

anru commented Jun 13, 2018

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

@JoelMarcey
Copy link
Contributor

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

anru added a commit to anru/Docusaurus that referenced this issue Jun 15, 2018
@anru
Copy link
Contributor

anru commented Jun 15, 2018

@JoelMarcey done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants