vuepress-theme-vdoing icon indicating copy to clipboard operation
vuepress-theme-vdoing copied to clipboard

[提问]: vercel部署报错

Open wulinghui opened this issue 2 years ago • 8 comments

问题描述

image

重现步骤(可选)

重现链接(可选)

问题截图(可选)

依赖版本(可选)

  • node.js:
  • @vuepress:
  • vuepress-theme-vdoing:

补充说明(可选)

wulinghui avatar Jan 23 '23 03:01 wulinghui

将nodejs版本设置为16.x image

kitUIN avatar Jan 25 '23 15:01 kitUIN

vercel 部署 veupress配置截图 vercel 部署 veupress

dazer007 avatar Apr 07 '23 05:04 dazer007

vercel在设置node版本为16.x的条件下,会在构建时给出一个警示: Error: Node.js version 16.x has reached End-of-Life. Deployments created on or after 2023-08-15 will fail to build. Please set Node.js Version to 18.x in your Project Settings to use Node.js 18.

意思是说在2023-08-25后使用16.x构建的项目都会失败,这该怎么解决

flow2000 avatar Jun 30 '23 12:06 flow2000

错误:Node.js 版本 16.x 已达到生命周期结束。在 2024 年 2 月 6 日或之后创建的部署将无法构建。请在项目设置中将 Node.js 版本设置为 18.x 以使用 Node.js 18。

我构建的时候,提示:16.x在 2024 年 2 月 6 日或之后创建的部署将无法构建,构建成功了,谢谢。看2024年2月6日之后还能用16.x不,我估计这个是随时间往后推移的,毕竟18.x目前构建会出错的。

zuqiuxie avatar Aug 04 '23 03:08 zuqiuxie

使用 18.x 及以上版本时,在 dev、build 前添加export NODE_OPTIONS=--openssl-legacy-provider 可构建成功,即:

"scripts": {
      "dev": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js dev docs",
      "build": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build docs"
    }

注意:在16.x及以下版本请不要添加,否则运行报错。

参考:https://github.com/vuejs/vuepress/issues/3095

xugaoyi avatar Aug 04 '23 08:08 xugaoyi

image @dazer007 @xugaoyi 你们好,我昨天按照设置,成功构建了,但是到晚上,出现这个错误,试了很久,请求帮助。

zuqiuxie avatar Aug 04 '23 23:08 zuqiuxie

image @dazer007 @xugaoyi 你们好,我昨天按照设置,成功构建了,但是到晚上,出现这个错误,试了很久,请求帮助。

@zuqiuxie 将 node 版本改为 18.x

xugaoyi avatar Aug 05 '23 05:08 xugaoyi

你好,按照要求升级node到18版之后,vercel部署报错

[2/4] Fetching packages...
warning [email protected]: Invalid bin field for "url-loader".
[3/4] Linking dependencies...
warning "vuepress-plugin-comment > gitalk-fix > [email protected]" has unmet peer dependency "[email protected] || 0.14.x || 15.x.x".
warning "vuepress-plugin-comment > gitalk-fix > [email protected]" has unmet peer dependency "[email protected] || 0.14.x || 15.x.x".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
success Saved lockfile.
Done in 50.02s.
Running "yarn run build"
yarn run v1.22.19
$ export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=8192 && vuepress build docs

最终卡到 export NODE_OPTIONS没有动静,以下是脚本命令:

"build": "export NODE_OPTIONS=--openssl-legacy-provider && node --max_old_space_size=8192 && vuepress build docs"

如果有哪位解决了上述问题麻烦留个言?

imoyao avatar Aug 21 '23 03:08 imoyao