vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.33k stars 923 forks source link

Fails to start on Windows #12

Closed nielsvanvelzen closed 3 years ago

nielsvanvelzen commented 3 years ago

I tried upgrading one of my projects to vuepress-next today and unfortunately the dev server does not work on Widows. Running the same command in WSL works perfectly fine.

Version

Vuepress 2.0.0-alpha.5

Reproduce

Run yarn vuepress dev in a Vuepress project on Windows.

Logs

$ D:\<path-to-project>\node_modules\.bin\vuepress dev
info Initializing VuePress and preparing data...
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.output.path: The provided value "D:/<path-to-project>/.vuepress/dist" is not an absolute path!
   -> The output directory as **absolute path** (required).
    at webpack (D:\<path-to-project>\node_modules\webpack\lib\webpack.js:31:9)
    at Object.dev (D:\<path-to-project>\node_modules\@vuepress\bundler-webpack\lib\dev\createDev.js:29:22)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async dev (D:\<path-to-project>\node_modules\@vuepress\cli\lib\commands\dev\dev.js:42:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
meteorlxy commented 3 years ago

Thanks for report. We'll test on Windows soon

rdrubis commented 3 years ago

I got the same error when starting a new vuepress@next project on Windows 10. I tried both npm and yarn.

meteorlxy commented 3 years ago

v2.0.0-alpha.7 should work well on windows now. Let me know if you meet any problems.

A known issue is the displayed url http://0.0.0.0:8080 should be replaced by http://localhost:8080, which will be fixed in next version

nielsvanvelzen commented 3 years ago

Thanks for the quick fix. I just tested it and it works with alpha.7!

rdrubis commented 3 years ago

This is to confirm the issue is resolved in v2.0.0-alpha.7!