Skip to content

Windowsネイティブ環境でmise run generate-webに失敗する #155

@kimushun1101

Description

@kimushun1101

@3w36zj6
Windowsのネイティブ環境でもmise環境構築を試してみたのでご報告します。

PS C:\Users\kimura\typst_ws\typst-jp.github.io> mise run generate-web
[install-website] $ bun install --frozen-lockfile
bun install v1.1.37 (8ca0eb83)

Checked 50 installs across 122 packages (no changes) [534.00ms]
[generate-web] $ bun install --frozen-lockfile
bun install v1.1.37 (8ca0eb83)

Checked 50 installs across 122 packages (no changes) [28.00ms]
[generate-web] $ bun run build
$ vite build
failed to load config from C:\Users\kimura\typst_ws\typst-jp.github.io\website\vite.config.ts
error during build:
Error: EPERM: operation not permitted, symlink 'C:\Users\kimura\typst_ws\typst-jp.github.io\assets\docs' -> 'C:\Users\kimura\typst_ws\typst-jp.github.io\website\public\assets\docs'
    at symlinkSync (node:fs:1808:11)
    at file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/.vite-temp/vite.config.ts.timestamp-1748031709052-5025355c43a33.mjs:13:1
    at ModuleJob.run (node:internal/modules/esm/module_job:268:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:26)
    at async loadConfigFromBundledFile (file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/vite/dist/node/chunks/dep-Pj_jxEzN.js:54671:15)
    at async bundleAndLoadConfigFile (file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/vite/dist/node/chunks/dep-Pj_jxEzN.js:54514:22)
    at async loadConfigFromFile (file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/vite/dist/node/chunks/dep-Pj_jxEzN.js:54476:44)
    at async resolveConfig (file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/vite/dist/node/chunks/dep-Pj_jxEzN.js:53975:24)
    at async createBuilder (file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/vite/dist/node/chunks/dep-Pj_jxEzN.js:51980:18)
    at async CAC.<anonymous> (file:///C:/Users/kimura/typst_ws/typst-jp.github.io/website/node_modules/vite/dist/node/cli.js:859:23)
error: script "build" exited with code 1
[generate-web] ERROR task failed

これはデフォルト設定のWindowsではシンボリックリンクが作成できないことが原因だと思われます。

Error: EPERM: operation not permitted, symlink 'C:\Users\kimura\typst_ws\typst-jp.github.io\assets\docs' -> 'C:\Users\kimura\typst_ws\typst-jp.github.io\website\public\assets\docs'
  • Windows側の設定で開発者モードにする1、またはターミナルを管理者権限で実行することで回避することはできました。
  • MacやLinuxでは発生しないと思われるため、これだけのためにシンボリックリンクからコピーに変更するというのも悩みどころです。
  • 当然ではありますが、WindowsでもWSLやDockerを使用すれば(Linux上での実行となるため)発生しません。

以上、ご意見いただけますと幸いです。

Footnotes

  1. https://minerva.mamansoft.net/Notes/Windows%E3%81%A7%E3%82%B7%E3%83%B3%E3%83%9C%E3%83%AA%E3%83%83%E3%82%AF%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%92%E4%BD%9C%E6%88%90%E3%81%A7%E3%81%8D%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8B%E8%A8%AD%E5%AE%9A

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions