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

前台npm 安装运行报错 #548

Open
nels20000 opened this issue Nov 4, 2024 · 4 comments
Open

前台npm 安装运行报错 #548

nels20000 opened this issue Nov 4, 2024 · 4 comments

Comments

@nels20000
Copy link

Error: The following dependencies are imported but could not be resolved:

@openai/realtime-api-beta/dist/lib/client.js (imported by E:/aiapi2/src/views/wav/realtime.vue?id=0)
vue-waterfall-plugin-next/dist/types/types/waterfall (imported by E:/aiapi2/src/views/kling/kgList.vue?id=0)

以为是版本太新了,waterfall降级以后依然报这个错误

@Dooy
Copy link
Owner

Dooy commented Nov 5, 2024

import { ItemType } from '@openai/realtime-api-beta/dist/lib/client.js';

这个引起的

@nels20000
Copy link
Author

那请问应该怎么解决呢

@Dooy
Copy link
Owner

Dooy commented Nov 7, 2024

应该是 npm 版本的问题 ,其他地方都能编译过去

比如我本地, 比如github打包

@Dooy
Copy link
Owner

Dooy commented Nov 8, 2024

在vite.conf.ts

 '@': path.resolve(process.cwd(), 'src'),
         'openai-realtime-api-beta-client': '@openai/realtime-api-beta/dist/lib/client.js',
         'vue-waterfall-plugin-next-waterfall': 'vue-waterfall-plugin-next/dist/types/types/waterfall',
      },
    },
image

然后在 相应的地方 替换下 就好

import { ItemType } from 'openai-realtime-api-beta-client';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants