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

SSR not working #95

Closed
1 task done
theBliz opened this issue Feb 25, 2020 · 8 comments · Fixed by #105
Closed
1 task done

SSR not working #95

theBliz opened this issue Feb 25, 2020 · 8 comments · Fixed by #105
Labels

Comments

@theBliz
Copy link

theBliz commented Feb 25, 2020

Bug Report

Related to docsifyjs/docsify#704
When following the steps to launch SSR implementation of docsify you get errors and the only example repo doesn't work.

Steps to reproduce

npm i now docsify-cli -D
copy docsify's package.json info in your empty project package.json

{
    "name": "my-project",
    "scripts": {
      "start": "docsify start . -c ssr.config.js",
      "deploy": "now -p"
    },
    "files": [
      "docs"
    ],
    "docsify": {
      "config": {
        "basePath": "https://docsify.js.org/",
        "loadSidebar": true,
        "loadNavbar": true,
        "coverpage": true,
        "name": "docsify"
      }
    }
  }

Launch npm start or docsify start . -c ssr.config.js

What is current behaviour

The error unknown argument: ssr.config.js is generated preventing the server to run.

What is the expected behaviour

Not sure, haven't found any working sample

Other relevant information

By launching the server doing docsify start ., the server runs but nothing is rendered.

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: Mojave 10.14.5

  • Node.js version: 10.16.0

  • npm/yarn version: npm 6.13.7

  • Browser version: Chrome 75.0.3770.142

  • Docsify version: 4.4.0

  • Docsify plugins: none

@anikethsaha
Copy link
Member

Can you try to re-produce this in https://github.com/docsifyjs/docsify-ssr-demo

@theBliz
Copy link
Author

theBliz commented Feb 25, 2020

@anikethsaha I've done it before opening the issue and it has the exact same problem. I've opened the issue here since the other repo has no activity. Any ideas what could be causing the issue?

@anikethsaha
Copy link
Member

Its related to docsify-cli . something about not able to parse the cli args clearly.

@anikethsaha anikethsaha transferred this issue from docsifyjs/docsify Feb 25, 2020
@anikethsaha
Copy link
Member

cc @jamesgeorge007

@sy-records
Copy link
Member

@anikethsaha Hello, How should this problem be solved?
There is also docsifyjs/docsify-ssr-demo#3 .
I tried https://github.com/docsifyjs/docsify-ssr-demo, which can also be re-produce.

@anikethsaha
Copy link
Member

some issue with argument parsing or something relative.
Need to take a look in it

@MichaelCurrin
Copy link
Contributor

I just ran into this issue.

The part that handles config expects 0 arguments instead of1 like port.

nargs: 0,

@MichaelCurrin
Copy link
Contributor

I made a local change to 1 and it picked up the config file without the error of unknown argument.

See PR #105.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants