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

vuepress project cannot be in some folder name start with n #642

Closed
jingzhe opened this issue Jul 11, 2018 · 4 comments · Fixed by #692
Closed

vuepress project cannot be in some folder name start with n #642

jingzhe opened this issue Jul 11, 2018 · 4 comments · Fixed by #692
Labels
contribution welcome Contributions welcome type: enhancement Request to enhance an existing feature

Comments

@jingzhe
Copy link
Contributor

jingzhe commented Jul 11, 2018

Bug report

Version

0.11.0

Steps to reproduce

  • Create a vuepress project under a folder name start with "n" in windows computer, for example c:\new\mydoc
  • try to build the code: npm run docs:build
  • Error:
    (undefined) ./node_modules/vuepress/lib/app/.temp/override.styl
    Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
    ModuleBuildError: Module build failed (from ./node_modules/stylus-loader/index.js):
    Error: C:\new\mydoc\web\node_modules\vuepress\lib\app.temp\override.styl:1:74
    1| @import("C:\new\mydoc\docs\.vuepress\override.styl")
    -------------------------------------------------------------------------------^

failed to locate @import file C:
ew\mydoc\web\docs\.vuepress\override.styl

  • seems that vuepress cannot handle escape "\n" in correct way in Windows. I didn't test in Mac and Linux, I think it should be fine.

What is expected?

"npm run docs:build" should build in any folder name

What is actually happening?

"npm run docs:build" building failed if the folder name start with "n"

Other relevant information

  • Your OS: Windows 7
  • Node.js version: v9.2.0
  • Browser version: Chrome Version 65.0.3325.181
  • Is this a global or local install? local install
  • Which package manager did you use for the install? npm
@ulivz
Copy link
Member

ulivz commented Jul 14, 2018

Thanks for your reporting, but I don't have windows computer, it there anyone could help me to sync with it?

@ulivz ulivz added the help wanted Extra attention is needed label Jul 14, 2018
@notiv-nt
Copy link

notiv-nt commented Jul 18, 2018

@ulivz quick solution: lib/prepare/index.js

const overridePath = path
  .resolve(sourceDir, '.vuepress/override.styl')
  .replace(/[\\]+/g, '/')

and also:

const stylePath = path
  .resolve(sourceDir, '.vuepress/style.styl')
  .replace(/[\\]+/g, '/')

Like that normalize-path

@jingzhe
Copy link
Contributor Author

jingzhe commented Jul 31, 2018

Thanks to notiv-nt & ulivz, problem solved. Are you going to release this bug fix?

@ulivz
Copy link
Member

ulivz commented Jul 31, 2018

@jingzhe does the workaround from @notiv-nt work for you? If yes, could you open a PR for that? Thanks.

@ulivz ulivz added contribution welcome Contributions welcome type: enhancement Request to enhance an existing feature and removed help wanted Extra attention is needed labels Jul 31, 2018
@ulivz ulivz closed this as completed in #692 Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contributions welcome type: enhancement Request to enhance an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants