Skip to content

使用符号链接作为 CodeUri 时运行失败 #13

Open
@DevDengChao

Description

@DevDengChao

复现步骤:

  1. 创建任意 NuxtJS 工程
  2. 使用 nuxt generate 生成静态网站
  3. 将产物 .output/public 文件夹的 dist 软连接作为 codeUri 进行部署
  4. 报错:
Error: EEXIST: file already exists, symlink '/root/workspace/nuxt-app/.output/public' -> '/root/.cache/.s/components/devsapp.cn/website-fc/src/code/public'
[15:29:35]     at Object.symlinkSync (node:fs:1651:3)
[15:29:35]     at oGe (/root/.s/cache/core/dist/index.js:19:1742)
[15:29:35]     at Jze (/root/.s/cache/core/dist/index.js:19:595)
[15:29:35]     at cQ (/root/.s/cache/core/dist/index.js:19:362)
[15:29:35]     at Qze (/root/.s/cache/core/dist/index.js:19:291)
[15:29:35]     at Object.Xze [as copySync] (/root/.s/cache/core/dist/index.js:19:169)
[15:29:35]     at index (/root/.cache/.s/components/devsapp.cn/website-fc/src/index.js:22:7)

运行环境:
OS: node:lts-slim Docker 镜像 (NodeJS: 18.12.1)
s: 2.1.7
website-fc: 0.0.5

变通方案:
直接使用 .output/public 作为 codeUri 进行部署.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions