Failed to mount: mount path must begin with "/"
See original GitHub issueBug 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
(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:
- Created 5 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When the next release comes out, I’m in great need of this correction?
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 aspath.join
will result in a backslash seperator on windows.I can submit a PR if you’d like?