Vuepress: Installation instructions on VuePress home page don't work again

Created on 6 Nov 2018  Â·  4Comments  Â·  Source: vuejs/vuepress




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




Bug report

Installation instructions on home page don't work for [email protected]

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 "[email protected]" 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 https://github.com/vuejs/vuepress/issues/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

All 4 comments

Try 1.0.0-alpha.20.

this was fixed in vuejs/vuepress@256b7c4

related to #949 and #908

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FadySamirSadek picture FadySamirSadek  Â·  3Comments

genedronek picture genedronek  Â·  3Comments

higuoxing picture higuoxing  Â·  3Comments

gaomd picture gaomd  Â·  3Comments

lileiseven picture lileiseven  Â·  3Comments