zpfz / vuepress-theme-antdocs

🔥🎨 An Ant Design style theme for VuePress. (QQ Group: 867711329) [NOTE: The AntDocs-next is WIP.]
https://antdocs.js.org/
MIT License
215 stars 28 forks source link

Centos服务器上打包 直接 killed #13

Closed LuBangTao closed 4 years ago

LuBangTao commented 4 years ago

我在Centos服务器上把项目拉下来,vuepress/vuepress-theme-antdocs都安装了,执行vuepress build dosc image

[root@lannis book2.0]# vuepress build docs
wait Extracting site metadata...
tip Apply theme vuepress-theme-antdocs ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/last-updated (i.e. "@vuepress/plugin-last-updated") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
tip Apply plugin @vuepress/medium-zoom (i.e. "@vuepress/plugin-medium-zoom") ...
tip Apply plugin @vuepress/back-to-top (i.e. "@vuepress/plugin-back-to-top") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...

● Client █████████████████████████ building (69%) 715/716 modules 1 active
 css-loader › postcss-loader › less-loader › node_modules/_vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/styles/index.less

● Server █████████████████████████ building (69%) 708/709 modules 1 active
 css-loader › postcss-loader › less-loader › node_modules/_vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/styles/index.less

Killed
[root@lannis book2.0]#

我在centos上用vuepress-creator创建的项目也不能打包~~~vuepress本地也安装了,打包还是失败。。。

image

[root@lannis myproject]# npm run build

> templete@1.1.0 build /lannis/opt/myproject
> vuepress build docs

wait Extracting site metadata...
tip Apply theme vuepress-theme-antdocs ...
tip Apply plugin container (i.e. "vuepress-plugin-container") ...
tip Apply plugin @vuepress/last-updated (i.e. "@vuepress/plugin-last-updated") ...
tip Apply plugin @vuepress/register-components (i.e. "@vuepress/plugin-register-components") ...
tip Apply plugin @vuepress/active-header-links (i.e. "@vuepress/plugin-active-header-links") ...
tip Apply plugin @vuepress/search (i.e. "@vuepress/plugin-search") ...
tip Apply plugin @vuepress/nprogress (i.e. "@vuepress/plugin-nprogress") ...
tip Apply plugin smooth-scroll (i.e. "vuepress-plugin-smooth-scroll") ...

● Client █████████████████████████ building (69%) 625/627 modules 2 active
 node_modules/ant-design-vue/es/_util/requestAnimationTimeout.js

● Server █████████████████████████ building (69%) 590/592 modules 2 active
 node_modules/ant-design-vue/es/time-picker/locale/en_US.js

Killed
[root@lannis myproject]#

咋搞哦。、、

zpfz commented 4 years ago

你可以先用 vuepress-creator 创建 Default (默认)主题,然后再 build 看看。如果还是出现上述问题,那可能不是 antdocs 主题导致的。 另外,通过搜索引擎搜索相关信息,有几率是你的服务器负载问题,详情见:Centos7 因内存 可用大小不足,被killed的解决办法linux下运行脚本时出现killed怎么解决?

LuBangTao commented 4 years ago
[/lannis/opt/book2.0/node_modules/core-js/library/fn/symbol/iterator.json]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.js]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.jsx]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.vue]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.json]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.styl]
[/lannis/opt/book2.0/node_modules/core-js/library/fn/symbol/iterator.styl]
 @ ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol/iterator.js 1:30-75
 @ ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js
 @ ./node_modules/_ant-design-vue@1.6.2@ant-design-vue/es/auto-complete/index.js
 @ ./node_modules/_ant-design-vue@1.6.2@ant-design-vue/es/index.js
 @ ./node_modules/_vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/enhanceApp.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/.temp/app-enhancers/0.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/.temp/internal/app-enhancers.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/client/app.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/client/serverEntry.js
 @ multi /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/client/serverEntry.js
Error: Failed to compile with errors.
    at webpack (/usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/node/build/index.js:180:16)
    at finalCallback (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:254:12)
    at runWithDependencies.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:277:6)
    at done (/usr/node/lib/node_modules/vuepress/node_modules/_neo-async@2.6.1@neo-async/async.js:2931:13)
    at runCompilers (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:181:48)
    at err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:188:7)
    at compiler.run (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:270:7)
    at finalCallback (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:257:39)
    at hooks.done.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:273:13)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:33:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at onCompiled (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:271:21)
    at hooks.afterCompile.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:681:15)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at compilation.seal.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:678:31)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at hooks.optimizeAssets.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compilation.js:1423:35)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at hooks.optimizeChunkAssets.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compilation.js:1414:32)
[root@lannis book2.0]# 

我把服务器的占用内存大的关掉,然后重新打包。。。报了一页错,,看不到头的那种。你能帮我在看下么么

LuBangTao commented 4 years ago

cnpm install core-js@2 上面那个问题 我重新安装了core-js就好了 然后打包 突然又好了。

就是系统内存不够的原因应该。我一直以为killed是打包过程输出的东西哦。。。谢谢

zpfz commented 4 years ago
[/lannis/opt/book2.0/node_modules/core-js/library/fn/symbol/iterator.json]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.js]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.jsx]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.vue]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.json]
[/lannis/opt/book2.0/node_modules/_core-js@3.6.5@core-js/library/fn/symbol/iterator.styl.styl]
[/lannis/opt/book2.0/node_modules/core-js/library/fn/symbol/iterator.styl]
 @ ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/symbol/iterator.js 1:30-75
 @ ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/typeof.js
 @ ./node_modules/_ant-design-vue@1.6.2@ant-design-vue/es/auto-complete/index.js
 @ ./node_modules/_ant-design-vue@1.6.2@ant-design-vue/es/index.js
 @ ./node_modules/_vuepress-theme-antdocs@1.1.1@vuepress-theme-antdocs/enhanceApp.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/.temp/app-enhancers/0.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/.temp/internal/app-enhancers.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/client/app.js
 @ /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/client/serverEntry.js
 @ multi /usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/client/serverEntry.js
Error: Failed to compile with errors.
    at webpack (/usr/node/lib/node_modules/vuepress/node_modules/_@vuepress_core@1.5.1@@vuepress/core/lib/node/build/index.js:180:16)
    at finalCallback (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:254:12)
    at runWithDependencies.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:277:6)
    at done (/usr/node/lib/node_modules/vuepress/node_modules/_neo-async@2.6.1@neo-async/async.js:2931:13)
    at runCompilers (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:181:48)
    at err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:188:7)
    at compiler.run (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/MultiCompiler.js:270:7)
    at finalCallback (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:257:39)
    at hooks.done.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:273:13)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:33:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at onCompiled (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:271:21)
    at hooks.afterCompile.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:681:15)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at compilation.seal.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compiler.js:678:31)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at hooks.optimizeAssets.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compilation.js:1423:35)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at AsyncSeriesHook.lazyCompileHook (/usr/node/lib/node_modules/vuepress/node_modules/_tapable@1.1.3@tapable/lib/Hook.js:154:20)
    at hooks.optimizeChunkAssets.callAsync.err (/usr/node/lib/node_modules/vuepress/node_modules/_webpack@4.43.0@webpack/lib/Compilation.js:1414:32)
[root@lannis book2.0]# 

我把服务器的占用内存大的关掉,然后重新打包。。。报了一页错,,看不到头的那种。你能帮我在看下么么

core-js 问题请见 #5