Electron打包的時候路徑出現問題!include: could not find: "C:UsersxxxxAppDataLocalTemp -TH3KzB

会飞的鱼9999發表於2024-04-25

!include: could not open file: "C:\ztg\projects\electron-vite-vue-ts\node_modules\.pnpm\app-builder-l

ib@24.13.3_dmg-builder@24.13.3_electron-builder-squirrel-windows@24.13.3_dmg-bui_lrspnoputfiosacwyigc

ypdbdi\node_modules\app-builder-lib\templates\nsis\include\allowOnlyOneInstallerInstance.nsh"

出現:

!include: could not open file,錯誤;

網上說是路徑中有中文,我的路徑上沒有中文,我想是不是也是路徑的問題,除了中文的問題,我只能想到路徑的長度問題了,於是我把檔案目錄的名稱改短點,重新

pnpm i
pnpm build:win

  成功了

相關文章