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

Build failing if executed from locally installed version inside node_modules #53

Closed
brianjorden opened this issue Apr 15, 2018 · 4 comments

Comments

@brianjorden
Copy link

This is a bit odd and I tried to spend a bit of time at least narrowing down a simple and reproducible scenario and "workaround" that I hope might help tracking things down. I seemed to have varying results when testing things, but I have narrowed things down to there being some issue with where the vuepress.js file is actually located when it is executed.

After assembling these screenshots, I tried installing globally and still got the same errors using that method. Although, I use a non-standard npm global directory location, so that could and occasionally does cause other issues.

On the surface this looks the same as #34, but hopefully this issue and method is a little easier to reproduce if it is the same. The screenshots include all steps for setup, multiple ways of trying to run the build process, and the somewhat surprising workaround.

In short, if vuepress is executed while under the node_modules directory, the build fails. If I simply move the vuepress directory out of there and into another directory, even at the same relative depth, it seems to work fine.

I am going to try and dig through the actual code a bit this evening, but wanted to share this first once I had a clearly reproducible scenario. As a side note, I've been extremely happy with what I think this is going to help me a ton with on some internal documentation and really excited to keep playing with it more, so please know the work is appreciated.

vp1-screenshot from 2018-04-15 14-34-18

vp2-screenshot from 2018-04-15 14-34-44

vp3-screenshot from 2018-04-15 14-35-04

vp4-screenshot from 2018-04-15 14-35-17

vp5-screenshot from 2018-04-15 14-46-29

vp6-screenshot from 2018-04-15 14-45-13

@brianjorden
Copy link
Author

Realized I should also include the copy/paste friendly and concise versions as well.

mkdir vuepress-test
cd vuepress-test
npm init -y
npm install -D vuepress
mv node_modules/vuepress/docs docs
./node_modules/vuepress/bin/vuepress.js build docs

I'm still not clear about what ends up being different here, but it does seem to work.

mkdir same_level
mv node_modules/vuepress same_level/vuepress
./same_level/vuepress/bin/vuepress.js build docs

@jaylinski
Copy link
Contributor

This may be related to this change: #16

Can you test if the problem persists on version v0.3.0?

@brianjorden
Copy link
Author

Actually I had this same issue yesterday when I was testing on v0.3.0, but those screenshots were from (and show in the first one) the latest v0.3.1 version. Happy to test things if I can though, but don't think you actually meant to try the lower version, can do so if you'd like though.

@yyx990803
Copy link
Member

Should be fixed with 42f63a8

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

3 participants