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

Installation instructions on VuePress home page don't work again #985

Closed
1 task done
avishnyakov opened this issue Nov 6, 2018 · 4 comments
Closed
1 task done

Comments

@avishnyakov
Copy link

avishnyakov commented Nov 6, 2018

  • I confirm that this is a issue rather than a question.

Bug report

Installation instructions on home page don't work for vuepress@1.0.0-alpha.19

https://vuepress.vuejs.org/#as-easy-as-1-2-3

# install
yarn global add vuepress@next 
# OR npm install -g vuepress@next

# create a markdown file
echo '# Hello VuePress' > README.md

# start writing
vuepress dev

# build to static files
vuepress build

Version

1.0.0-alpha.19

Steps to reproduce

yarn global add vuepress@next 
echo '# Hello VuePress' > README.md
vuepress dev

What is expected?

vuepress works

What is actually happening?

Other relevant information

vuepress can't resolve theme @vuepress/default.

....
success Installed "vuepress@1.0.0-alpha.19" with binaries:
      - vuepress
✨  Done in 185.08s.
vuepress --version
1.0.0-alpha.19


echo '# Hello VuePress' > README.md
vuepress dev

 WAIT  Extracting site metadata...

 TIP  Temp directory: /Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/core/.temp
Error: Cannot resolve theme @vuepress/default.
    at loadTheme (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/core/lib/prepare/loadTheme.js:57:13)
    at AppContext.resolveTheme (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/core/lib/prepare/AppContext.js:280:32)
    at AppContext.process (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/core/lib/prepare/AppContext.js:77:16)
    at prepare (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/core/lib/prepare/index.js:15:20)
    at dev (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/core/lib/dev.js:23:21)
    at args (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/cli/index.js:120:14)
    at Command.program.command.description.option.option.option.option.option.option.action (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/cli/index.js:50:23)
    at Command.listener (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/cli/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:182:13)
    at Command.parseArgs (/Users/avishnyakov/.config/yarn/global/node_modules/@vuepress/cli/node_modules/commander/index.js:654:12)
  • Your OS: macos
  • Node.js version: v10.2.1
  • Browser version: N/A
  • Is this a global or local install? global
  • Which package manager did you use for the install? yarn

Relates to #908
Relates to [Feature] Offical Vuepress docker container #974

Same-same under the following docker container

Error: Cannot resolve theme @vuepress/default.

FROM node:9.11.1-alpine

ARG VUEPRESS_VERSION=next

# vue press install
# https://vuepress.vuejs.org/
RUN npm install -g vuepress@${VUEPRESS_VERSION}

# tried this too, does not help
# RUN npm install -g @vuepress/theme-default

# fixes temporary prettier issue
# Module build failed: Error: No parser and no file path given, couldn't infer a parser.
# https://stackoverflow.com/questions/50555953/vue-webpack-template-missing-parser
# RUN cd /usr/local/lib/node_modules/vuepress \
#     && npm i prettier@~1.12.0

# viepress validation
RUN  mkdir -p /tmp/vuepress-app \
    && cd /tmp/vuepress-app \
    && echo '# Hello VuePress' > README.md \
    && vuepress --version \
    && vuepress build 

WORKDIR /app

Output:

Error: Cannot resolve theme @vuepress/default.
    at loadTheme (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/prepare/loadTheme.js:57:13)
    at AppContext.resolveTheme (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/prepare/AppContext.js:280:32)
    at AppContext.process (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/prepare/AppContext.js:77:16)
    at prepare (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/prepare/index.js:15:20)
    at build (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/core/lib/build.js:19:21)
    at args (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/cli/index.js:120:14)
    at Command.program.command.description.option.option.option.option.option.action (/usr/local/lib/node_modules/vuepress/node_modules/@vuepress/cli/index.js:63:25)
    at Command.listener (/usr/local/lib/node_modules/vuepress/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:180:13)
    at Command.parseArgs (/usr/local/lib/node_modules/vuepress/node_modules/commander/index.js:654:12)

Just a suggestion - from what can be seen in the issue tracker, a docker container per release might be a really good idea. Simple install and build would help a lot - users won't have doubts on how to install/use vuepress, and all "works on my machine" issues will go away. FYI @heyheni

@ulivz ulivz closed this as completed in 256b7c4 Nov 9, 2018
@ulivz
Copy link
Member

ulivz commented Nov 9, 2018

Try 1.0.0-alpha.20.

@jrappen
Copy link

jrappen commented Nov 10, 2018

this was fixed in 256b7c4

@jrappen
Copy link

jrappen commented Nov 10, 2018

related to #949 and #908

@avishnyakov
Copy link
Author

@ulivz

Try 1.0.0-alpha.20.

Needless to highlight that Docker container suggested by @heyheni in #974 makes sense. No one would have to "try", we would have CI to "try" for us and make sure it's (1) buildable and (2) workable at least to the level of the initial installation instructions. Besides, solves #949, #908 and this #985 before they even arise.

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