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

vue3 +ts的项目使用时候 npm i 之后 引用报这个错 #391

Open
huangwenboha563 opened this issue May 28, 2024 · 5 comments
Open

Comments

@huangwenboha563
Copy link

main.ts:64 [Vue Router warn]: Unexpected error when starting the router: Error: Could not resolve "segmentit" imported by "pinyin". Is it installed?
at pinyin.js?v=0fbf07e6:82399:7

Error: Could not resolve "segmentit" imported by "pinyin". Is it installed?
@JACK-ZHANG-coming
Copy link

我也是vue3+ts项目,卸载4版本,安装3.1.0版本后可以正常运行

@JACK-ZHANG-coming
Copy link

还是用2.11.2版本吧,3.1.0打包的时候报错,低一点稳定些

@qiutian00
Copy link

还是用2.11.2版本吧,3.1.0打包的时候报错,低一点稳定些

This works for me

@M69W
Copy link

M69W commented Jul 2, 2024

还是用2.11.2版本吧,3.1.0打包的时候报错,低一点稳定些

+1

@yechangxiao
Copy link

在3.1.0版本中,segmentit这个依赖是放在optionalDependencies中的,如果node版本低,或者安装的时候指定了不安装optional依赖--omit=optional,都会导致这个依赖不安装然后报错,这时候需要显示在项目中安装segmentit

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

5 participants