ai-shifu / ai-shifu/ChatALL

[BUG] There are some mistakes about package conflict when built the ChatALL at windows platform.

未关闭
#939 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
JavaScript
星标
16.5k
派生
1.7k
PR 合并指标
30 天内没有已合并 PR

描述

### Describe the bug / 描述问题

When building my Electron application using `npm run electron:serve`, I encounter a `SyntaxError: Invalid left-hand side in assignment` originating from the `cohere-ai` package's `aws-utils.js` file. This error prevents the application from launching correctly. I did not change any code in the latest release version (ChatALL-1.83.108). But I expect to change some model name and build my own ChatALL.

Build error occur in `cohere-ai` package (version 7.14.0)

Error information in packaged electron app:
```
ERROR
Invalid left-hand side in assignment
SyntaxError: Invalid left-hand side in assignment
at ./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/aws-utils.js (http://localhost:8080/js/chunk-vendors.js:6361:1)
at webpack_require (http://localhost:8080/js/app.js:5457:32)
at fn (http://localhost:8080/js/app.js:5819:21)
at eval (webpack-internal:///./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/BedrockClient.js:4:21)
at ./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/BedrockClient.js (http://localhost:8080/js/chunk-vendors.js:3369:1)
at webpack_require (http://localhost:8080/js/app.js:5457:32)
at fn (http://localhost:8080/js/app.js:5819:21)
at eval (webpack-internal:///./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/index.js:28:23)
at ./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/index.js (http://localhost:8080/js/chunk-vendors.js:7241:1)
at webpack_require (http://localhost:8080/js/app.js:5457:32)
```

In powershell:
```
INFO Launching Electron...

Set.proxySetting.normal
[19488:1128/132658.785:ERROR:web_contents_preferences.cc(240)] preload script must have absolute path.
update-electron-app config looks good; aborting updates since app is in development mode
[19488:1128/132703.838:ERROR:CONSOLE(2)] "Electron sandboxed_renderer.bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (2)
[19488:1128/132703.838:ERROR:CONSOLE(2)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (2)
[19488:1128/132704.185:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[19488:1128/132704.185:ERROR:CONSOLE(1)] "Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
```

### To Reproduce / 复现步骤

Steps to reproduce the behavior:
1. Download the latest source code version (ChatALL-1.83.108). Unzip the file.
2. Open the Powershell in the file path
3. `npm install`
4. `npm run electron:serve`

platform:
win11
node.js -version: v20.5.1

I install related package using `cnpm install`

### Expected behavior / 期望行为

Build the ChatALL app using node.js in windows

### Screenshots / 截图

_No response_

### Devtools Info / 开发者工具信息

ERROR
Invalid left-hand side in assignment
SyntaxError: Invalid left-hand side in assignment
at ./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/aws-utils.js (http://localhost:8080/js/chunk-vendors.js:6361:1)
at webpack_require (http://localhost:8080/js/app.js:5457:32)
at fn (http://localhost:8080/js/app.js:5819:21)
at eval (webpack-internal:///./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/BedrockClient.js:4:21)
at ./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/BedrockClient.js (http://localhost:8080/js/chunk-vendors.js:3369:1)
at webpack_require (http://localhost:8080/js/app.js:5457:32)
at fn (http://localhost:8080/js/app.js:5819:21)
at eval (webpack-internal:///./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/index.js:28:23)
at ./node_modules/.store/cohere-ai@7.14.0/node_modules/cohere-ai/index.js (http://localhost:8080/js/chunk-vendors.js:7241:1)
at webpack_require (http://localhost:8080/js/app.js:5457:32)

### OS and version / 操作系统版本

Windows11

### ChatALL version / ChatALL 版本

1.83.108

### Network / 网络

Yes

### Additional context / 其它相关信息

_No response_

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。