question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to mount: mount path must begin with "/"

See original GitHub issue

Bug Report

Describe the bug

yarn docz:dev on a fresh create-react-app fails with the error:

AssertionError [ERR_ASSERTION]: mount path must begin with “/”

To Reproduce

Reproduction Repository

(Optional: 1. Generate a fresh create-react-app and install Docz as usual) 2. Run yarn docz:dev 3. See error

create-react-app docz-bug
cd docz-bug
yarn add docz --dev 
# add scripts to package.json
yarn docz:dev
AssertionError [ERR_ASSERTION]: mount path must begin with "/"
    at mount (C:\Users\Kalyn Robinson\Documents\Development\aap\spill\node_modules\koa-mount\index.js:33:10)
    at Object.add (C:\Users\Kalyn Robinson\Documents\Development\aap\spill\node_modules\docz-core\dist\index.js:1:104906)
    at promise.then (C:\Users\Kalyn Robinson\Documents\Development\aap\spill\node_modules\docz-core\node_modules\webpack-serve\lib\app.js:45:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.

Expected behavior

Docz should successfully compile.

Environment

  • OS: Windows 10
  • Node/npm version:
    • Yarn 1.12.3
    • Node v10.3.0

Additional context/Screenshots Docz provides koa-mount with the path \public; koa-mount only accepts paths that begin with /. Hardcoding the path as /public in koa-mount/index.js circumvents this issue (please forgive me for this sin).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
EduhCostacommented, Dec 7, 2018

When the next release comes out, I’m in great need of this correction?

3reactions
patricksevatcommented, Dec 6, 2018

Hi, I’ve run into this issue as well.

I’ve narrowed it down to https://github.com/pedronauck/docz/blob/master/packages/docz-core/src/webpack/devserver.ts#L46 . The fix is simple: just use path.posix.join to force a forward slash for the route as path.join will result in a backslash seperator on windows.

I can submit a PR if you’d like?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid mount path: mount path must be absolute error (solved)
Hi, all, I'm new to Docker and I have encountered my first error that I can't seem to overcome or troubleshoot through. I...
Read more >
Docker compose Invalid volume destination path: '.' mount ...
Im getting error as : ERROR: for db Cannot create container for service db: Invalid volume spec ".": Invalid volume destination path: '.'...
Read more >
"Invalid mount path" error using Lean via Docker Toolbox
The error you are seeing most likely means the VM which Docker runs in ran out of disk space. Can you try running...
Read more >
Docker: Fix Invalid Bind Mount Spec in Git Bash
Error response from daemon: invalid bind mount spec ... config for type "bind": invalid mount path: '\Program Files\Git\app' mount path must be absolute....
Read more >
Mount path must be absolute : r/docker - Reddit
Docker is running on headless Ubuntu server, and I'm using portainer to manage. I've encountered an issue where the "mount paths must be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found