Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] ide-startup改造升级opensumiv3.1.0失败 #3782

Open
heroyanglonghui opened this issue Jun 14, 2024 · 1 comment
Open

[Question] ide-startup改造升级opensumiv3.1.0失败 #3782

heroyanglonghui opened this issue Jun 14, 2024 · 1 comment
Labels
💬 question Further information is requested

Comments

@heroyanglonghui
Copy link

主要是WebIDE场景下,基于 opensumi v3版本的AI的能力做定制化开发并参考 core/packages/starup 代码升级 ide-startup

  • 升级 opensumi 包到3.1.0
  • browser/index.ts 参考 core/packages/starup/entry/web/app.tsx
  • node/common-modules.ts 参考 core/packages/startup/src/browser/common-modules.ts
  • 运行yarn start webpack4 编译报错

node v14.21.3
yarn run v1.22.18
run-p start:client start:server start:webview

ERROR in ./node_modules/web-tree-sitter/tree-sitter.js 1:4558
Module parse failed: Unexpected token (1:4558)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

ERROR in ./node_modules/js-tiktoken/dist/index.cjs 71:15
Module parse failed: Unexpected token (71:15)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| var _Tiktoken = class {
|   /** @internal */
>   specialTokens;
|   /** @internal */
|   inverseSpecialTokens;
 @ ./node_modules/@opensumi/ide-ai-native/lib/browser/contrib/inline-completions/prompt/tokenizer.js 5:22-44
 @ ./node_modules/@opensumi/ide-ai-native/lib/browser/contrib/inline-completions/prompt/prompt.js
 @ ./node_modules/@opensumi/ide-ai-native/lib/browser/contrib/inline-completions/provider.js
 @ ./node_modules/@opensumi/ide-ai-native/lib/browser/contrib/inline-completions/completeProvider.js
 @ ./node_modules/@opensumi/ide-ai-native/lib/browser/ai-core.contribution.js
 @ ./node_modules/@opensumi/ide-ai-native/lib/browser/index.js
 @ ./src/browser/common-modules.ts
 @ ./src/browser/index.ts

@Ricbet 请问 opensumi v3 在 webide 场景下 有参考的模板吗?

@heroyanglonghui heroyanglonghui added the 💬 question Further information is requested label Jun 14, 2024
@bytemain
Copy link
Member

这个报错是 webpack4 不支持解析这个依赖包,升级到 webpack5 吧

可以参考这个 pr: opensumi/ide-startup#106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants