doczjs / docz

✍ It has never been so easy to document your things!
https://docz.site
MIT License
23.6k stars 1.46k forks source link

Component Shadowing feature not working when publish on vercel.com #1548

Closed zhengchun closed 4 years ago

zhengchun commented 4 years ago

Question

Hello, I need some help. I published my docs website on vercel.com, I found my custom components not working, custom CSS style is not working either. I not sure this issue is caused by docz or vercel.com

Description

My docs project: https://github.com/zhengchun/sitemaphub-docs

My vercel.com project: https://sitemaphub-docs-git-master.zhengchun.vercel.app/

My expected: 2

Actually preview: 1

Build & Development Settings on Vercel.com

Framework Preset: [Other|Gatsby], both I tried, result is same.
Build Command: yarn build
Root Directory: ./

Below is the building log from vercel.com:

18:47:03.635    Cloning github.com/zhengchun/sitemaphub-docs (Branch: master, Commit: 441aeba)
18:47:04.397    Cloning completed in 762ms
18:47:04.397    Analyzing source code...
18:47:05.573    Installing build runtime...
18:47:06.090    Build runtime installed: 516.463ms
18:47:06.470    Looking up build cache...
18:47:06.587    Build cache found. Downloading...
18:47:08.681    Build cache downloaded [59.19 MB]: 2092.83ms
18:47:09.076    Installing dependencies...
18:47:09.289    yarn install v1.22.4
18:47:09.390    [1/4] Resolving packages...
18:47:09.988    success Already up-to-date.
18:47:09.991    Done in 0.70s.
18:47:10.362    yarn run v1.22.4
18:47:10.399    $ docz build
18:47:11.788    npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1595933230402-0.11713171450023996/node but npm is using /node12/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
18:47:11.789    > docz-app@ build /vercel/2fe128fd/.docz
18:47:11.789    > gatsby build "--prefix-paths"
18:47:14.282    success open and validate gatsby-configs - 0.658s
18:47:14.410    success load plugins - 0.128s
18:47:14.412    success onPreInit - 0.001s
18:47:14.421    success delete html and css files from previous builds - 0.008s
18:47:14.425    success initialize cache - 0.004s
18:47:14.444    success copy gatsby files - 0.019s
18:47:14.611    success onPreBootstrap - 0.166s
18:47:14.665    success createSchemaCustomization - 0.003s
18:47:15.392    success Checking for changed pages - 0.000s
18:47:15.392    success source and transform nodes - 0.726s
18:47:15.688    success building schema - 0.296s
18:47:15.689    success createPages - 0.000s
18:47:15.689    success Checking for changed pages - 0.000s
18:47:16.388    success createPagesStatefully - 0.697s
18:47:16.429    success updating schema - 0.041s
18:47:16.430    success onPreExtractQueries - 0.000s
18:47:16.465    success extract queries from components - 0.035s
18:47:16.467    success write out redirect data - 0.000s
18:47:16.468    success onPostBootstrap - 0.000s
18:47:16.469    info bootstrap finished - 4.671s
18:47:16.486    success run static queries - 0.007s - 1/1 153.81/s
18:47:16.495    success run page queries - 0.008s - 13/13 1554.72/s
18:47:16.498    success write out requires - 0.002s
18:47:45.419    success Building production JavaScript and CSS bundles - 28.634s
18:47:45.524    success Rewriting compilation hashes - 0.024s
18:47:52.715    success Building static HTML for pages - 7.036s - 13/13 1.85/s
18:47:53.178    success onPostBuild - 0.463s
18:47:53.181    info Done building in 41.383580854 sec
18:47:53.463    Done in 43.10s.
18:47:53.834    Uploading build outputs...
18:48:02.698    Build completed. Populating build cache...
18:48:21.334    Uploading build cache [47.58 MB]...
18:48:22.255    Build cache uploaded: 920.204ms
18:48:22.268    Done with "package.json"
zhengchun commented 4 years ago

fixed, Components folder name should be lowercase. closed,

Emiliano-Bucci commented 4 years ago

@zhengchun Hi! I'm trying to deploy my docs to Vercel too (after running npm run docz:build) i've pushed the .docz/dist folder to vercel but for some reason it isn't working. Is there some particular config/steps to do? Thanks! :)

zhengchun commented 4 years ago

Trying Setting your Output Directory to .docz/dist in the Build & Development Settings on Vercel dashbroject .

Emiliano-Bucci commented 4 years ago

@zhengchun For some reason it isn't working. The weird thing is that i'm actually pushing .docz/dist folder using now .docz/dist so at the end i'm uploading the entire root folder of the static app, so by accessing to the url that now generate after every deploy i should see the index.html file, so basically the Gatsby app used by docz.