yann0917 / dedao-gui

wails + go + vue3 实现得到已购课程下载的桌面客户端
MIT License
179 stars 47 forks source link

Build时出现如下报错 #27

Closed septfoil closed 7 months ago

septfoil commented 7 months ago

`Done. • Installing frontend dependencies: Done. • Compiling frontend:

frontend@0.0.0 build vue-tsc --noEmit && vite build

✘ [ERROR] Expected "," in JSON but found "\"workspaces\""

    ../../../package.json:7:0:
      7 │ "workspaces": {
        │ ~~~~~~~~~~~~
        ╵ ,

failed to load config from /Users/xxxx/Downloads/dedao-gui-main/frontend/vite.config.ts
error during build:
Error: Build failed with 1 error:
../../../package.json:7:0: ERROR: Expected "," in JSON but found "\"workspaces\""
    at failureErrorWithLog (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1575:15)
    at /Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1033:28
    at runOnEndCallbacks (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1447:61)
    at buildResponseToResult (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1031:7)
    at /Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:1143:14
    at responseCallbacks.<computed> (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:680:9)
    at handleIncomingPacket (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:735:9)
    at Socket.readFromStdout (/Users/111/Downloads/dedao-gui-main/frontend/node_modules/esbuild/lib/main.js:656:7)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)`
yann0917 commented 7 months ago

执行 wails doctor 看看,很有可能是 node 版本的问题

septfoil commented 7 months ago

执行 wails doctor 看看,很有可能是 node 版本的问题

执行结果如下:


# Wails
Version | v2.8.0

# System
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | MacOS                                                                                                                       |
| Version      | 14.3.1                                                                                                                      |
| ID           | 23D60                                                                                                                       |
| Go Version   | go1.22.1                                                                                                                    |
| Platform     | darwin                                                                                                                      |
| Architecture | arm64                                                                                                                       |
| CPU          | Apple M2 Max                                                                                                                |
| GPU          | Chipset Model: Apple M2 Max Type: GPU Bus: Built-In Total Number of Cores: 30 Vendor: Apple (0x106b) Metal Support: Metal 3 |
| Memory       | 64GB                                                                                                                        |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌─────────────────────────────────────────────────────────────────────┐
| Dependency                | Package Name | Status    | Version      |
| Xcode command line tools  | N/A          | Installed | 2405         |
| Nodejs                    | N/A          | Installed | 20.9.0       |
| npm                       | N/A          | Installed | 10.1.0       |
| *Xcode                    | N/A          | Installed | 15.1 (15C65) |
| *upx                      | N/A          | Available |              |
| *nsis                     | N/A          | Available |              |
└────────────────────── * - Optional Dependency ──────────────────────┘

# Diagnosis
Optional package(s) installation details: 
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!