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

无法支持私有化自定义nginx部署 #464

Closed
DreamPWJ opened this issue Jan 4, 2021 · 38 comments
Closed

无法支持私有化自定义nginx部署 #464

DreamPWJ opened this issue Jan 4, 2021 · 38 comments
Labels
question Further information is requested

Comments

@DreamPWJ
Copy link

DreamPWJ commented Jan 4, 2021

Question

没有index.html文件入口

Sample Code

image

@DreamPWJ DreamPWJ added the question Further information is requested label Jan 4, 2021
@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

部署国外访问都很慢 公司内部文档

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

你这个 build 是组件打包用的,要生成文档的 dist,使用 npm run docs:build

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

@xrkffgg 谢谢搞定了 但是我升级到dumi1.1.0无法启动

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

贴下报错

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

image
偶尔发生 现在又好了

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

能不能支持word或pdf导出功能 也方便离线分享?

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

其实都是 md 文件,直接看 md 文件也可以

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

看图片是 关于 sass 的

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

好像是sass的不管了 这个包很顽固, 我们有时候需要给外面人员或者客户等 md格式查看器他们都没有

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

我想把公司所有的产品文档 组件库 前后端API设计 知识库,日常各种账号证书过期提醒等都放在dumi上不知道可行不?

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

放在dumi

其实应该是使用 dumi 来使得这些文档更容易查看

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

正在尝试和选型中 现在工具太分散 没有几个大统一合适的

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

dumi 值得信赖~

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

@xrkffgg 实验阶段遇到一个问题 就是我有一个markdown数据http连接 如何做到实时渲染到咱们的dumi内?

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

实时的话,只能把内容放到 tsx 里了,通过 http 请求。md 里都是静态的

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

我还有一种思路,就是把这个数据做成一张图片,这个图片 src 是展示的是实时的数据

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

markdown 本质是加强版的 txt 😂

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

实时的话,只能把内容放到 tsx 里了,通过 http 请求。md 里都是静态的
这种方式比较靠谱 axios支持是吧?

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

有没有示例可以参考一下? 着急做方案选型对比

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

dumi 1.1.0 打包还是有问题 说umi命令丢失

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

build?

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

docs:build

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 4, 2021

http请求有没有示例可以参考一下?

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

没有实际例子 你可以看看 #166 里面有没项目用到的

你可以提供下具体报错信息

@mizhousoft
Copy link

下载了最新模板打包有问题

C:\work\opensource\dumi\dumi-template>npm run docs:build

[email protected] docs:build C:\work\opensource\dumi\dumi-template
dumi build

  • Webpack █████████████████████████ emitting (95%)
    OptimizeCssAssetsWebpackPlugin

[Error: EINVAL: invalid argument, mkdir 'C:\work\opensource\dumi\dumi-template\docs-dist~demos:uuid'] {
errno: -4071,
code: 'EINVAL',
syscall: 'mkdir',
path: 'C:\work\opensource\dumi\dumi-template\docs-dist\~demos\:uuid'
}
build failed
Error: build failed
at C:\work\opensource\dumi\dumi-template\node_modules@umijs\bundler-webpack\lib\index.js:138:27
at finalCallback (C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\MultiCompiler.js:254:12)
at C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\MultiCompiler.js:275:14
at C:\work\opensource\dumi\dumi-template\node_modules\neo-async\async.js:2830:7
at done (C:\work\opensource\dumi\dumi-template\node_modules\neo-async\async.js:2925:13)
at C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\MultiCompiler.js:186:23
at C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\MultiCompiler.js:267:15
at finalCallback (C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\Compiler.js:257:39)
at C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\Compiler.js:279:21
at C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\Compiler.js:480:22
at C:\work\opensource\dumi\dumi-template\node_modules\neo-async\async.js:2830:7
at done (C:\work\opensource\dumi\dumi-template\node_modules\neo-async\async.js:3517:9)
at writeOut (C:\work\opensource\dumi\dumi-template\node_modules\webpack\lib\Compiler.js:369:23)
at C:\work\opensource\dumi\dumi-template\node_modules\mkdirp\index.js:48:53
at FSReqCallback.oncomplete (fs.js:168:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] docs:build: dumi build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] docs:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lsp_l\AppData\Roaming\npm-cache_logs\2021-01-04T10_28_25_084Z-debug.log

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

Umi 的动态路由不支持 win

@PeachScript 有啥解决办法吗?

@xrkffgg
Copy link
Member

xrkffgg commented Jan 4, 2021

@mizhousoft 可以先去掉配置文件里的 exportStatic

@mizhousoft
Copy link

删除后打包正常了

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 5, 2021

image
打包偶尔报错

@xrkffgg
Copy link
Member

xrkffgg commented Jan 5, 2021

node_modules 是用 npm 安装的 还是 Yarn 还是 cnpm ?

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 5, 2021

 npm   设置了  "npm config set registry https://registry.npm.taobao.org"

@xrkffgg
Copy link
Member

xrkffgg commented Jan 5, 2021

试试 yarn

@xrkffgg
Copy link
Member

xrkffgg commented Jan 5, 2021

@mizhousoft 如果要使用 exportStatic 可以试试这个方案 https://github.com/xrkffgg/umi-win-exportStatic

@PeachScript
Copy link
Member

Umi 的动态路由不支持 win

@PeachScript 有啥解决办法吗?

目前没办法解决…后面 Umi 会把动态路由换成 [:id].html 的形式就可以了

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 7, 2021

@xrkffgg 有没有钉钉群 或者个人钉钉 有几个问题需要解答一下

@xrkffgg
Copy link
Member

xrkffgg commented Jan 7, 2021

主页有钉钉群

@DreamPWJ
Copy link
Author

DreamPWJ commented Jan 8, 2021

@xrkffgg 二维码早过期了 之前扫过

@PeachScript
Copy link
Member

issue 所提问题已解决,如果有其他问题请新开 issue,先关闭了

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

No branches or pull requests

4 participants