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

useDraggable.d.ts:1:25 - error TS1005: ',' expected. #58

Open
xiandanchaorenguagua opened this issue Nov 20, 2023 · 6 comments
Open

useDraggable.d.ts:1:25 - error TS1005: ',' expected. #58

xiandanchaorenguagua opened this issue Nov 20, 2023 · 6 comments

Comments

@xiandanchaorenguagua
Copy link

PS F:\demo> npm run build

[email protected] build F:\demo
vue-tsc --noEmit && vite build

node_modules/vue-draggable-plus/dist/useDraggable.d.ts:1:25 - error TS1005: ',' expected.

1 import Sortable, { type Options, type SortableEvent } from 'sortablejs';
~~~~~~~

node_modules/vue-draggable-plus/dist/useDraggable.d.ts:1:39 - error TS1005: ',' expected.

1 import Sortable, { type Options, type SortableEvent } from 'sortablejs';
~~~~~~~~~~~~~

Found 2 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: vue-tsc --noEmit && vite build
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

@chouchouji
Copy link
Contributor

Can you provide the current version of vue-draggable-plus ?

@QBL2333
Copy link

QBL2333 commented Dec 12, 2023

版本0.3.2遇到同样的问题,pnpm -r build时报错
../node_modules/.pnpm/vue-draggable-plus@0.3.2_@types[email protected]/node_modules/vue-draggable-plus/dist/useDraggable.d.ts(1,25): error TS1005: ',' expected.
../node_modules/.pnpm/vue-draggable-plus@0.3.2_@types[email protected]/node_modules/vue-draggable-plus/dist/useDraggable.d.ts(1,39): error TS1005: ',' expected.

@chouchouji
Copy link
Contributor

版本0.3.2遇到同样的问题,pnpm -r build时报错 ../node_modules/.pnpm/vue-draggable-plus@0.3.2_@types[email protected]/node_modules/vue-draggable-plus/dist/useDraggable.d.ts(1,25): error TS1005: ',' expected. ../node_modules/.pnpm/vue-draggable-plus@0.3.2_@types[email protected]/node_modules/vue-draggable-plus/dist/useDraggable.d.ts(1,39): error TS1005: ',' expected.

我今天晚上会看下这个问题

@chouchouji
Copy link
Contributor

版本0.3.2遇到同样的问题,pnpm -r build时报错 ../node_modules/.pnpm/vue-draggable-plus@0.3.2_@types[email protected]/node_modules/vue-draggable-plus/dist/useDraggable.d.ts(1,25): error TS1005: ',' expected. ../node_modules/.pnpm/vue-draggable-plus@0.3.2_@types[email protected]/node_modules/vue-draggable-plus/dist/useDraggable.d.ts(1,39): error TS1005: ',' expected.

能提供一下可以复现的代码或者仓库吗?我这里新创建了一个项目,例子是官网的hook示例,打包没有报错
image

@QBL2333
Copy link

QBL2333 commented Dec 12, 2023

感谢debug,代码不太方便共享,既然不是普遍问题我之后再自己试试🤔

@QBL2333
Copy link

QBL2333 commented Jan 2, 2024

补充:应该是typescript版本的问题,出现报错的repo使用的typescript版本是4.4.4,不支持import type语法所以报错了

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

No branches or pull requests

4 participants