Node.js/webpack:修订间差异
来自康健生活
| 第682行: | 第682行: | ||
* 2 hidden modules | * 2 hidden modules | ||
* {{Underline|vue 提取 css 失败|red|green}},用排除法,找到原因:package.json 中的 sideEffects,删除即可 | * {{Underline|vue 提取 css 失败|red|green}},用排除法,找到原因:package.json 中的 sideEffects,删除即可 | ||
* UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! | |||
*: <pre> | |||
(node:51153) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. | |||
Error: Failed to launch chrome! | |||
/root/vue-webpack/node_modules/puppeteer/.local-chromium/linux-637110/chrome-linux/chrome: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory | |||
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md | |||
at onClose (/root/vue-webpack/node_modules/puppeteer/lib/Launcher.js:342:14) | |||
</pre> | |||
*: headless:false参数,Linux服务器没有图形界面没有办法运行。 | |||
* ERROR: Failed to download Chromium r637110! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download. | |||
Error: connect ECONNREFUSED 127.0.0.1:80 | |||
*: <syntaxhighlight lang="bash"> | |||
npm config set puppeteer_download_host=https://npm.taobao.org/mirrors | |||
npm i puppeteer</syntaxhighlight> | |||