vue-native-websocket-vue3
vue-native-websocket-vue3 copied to clipboard
Can not to import
I am using vite and in main.ts file I have this error
Could not find a declaration file for module 'vue-native-websocket-vue3'. '..../node_modules/vue-native-websocket-vue3/dist/vueNativeWebsocket.common.js' implicitly has an 'any' type.
Try npm i --save-dev @types/vue-native-websocket-vue3 if it exists or add a new declaration (.d.ts) file containing `declare module 'vue-native-websocket-vue3
According to error message I try to install @types/vue-native-websocket-vue3 but I have the following error
error An unexpected error occurred: "https://registry.yarnpkg.com/@types%2fvue-native-websocket-vue3: Not found".
I have a project that is also built based on vite+vue3+ts, and it can run normally. You can refer to the writing method of my project to troubleshoot the problem.
Ok! I have cloned the chat-system however the project runs but in main.ts I have the same typescript error
Ok! I have cloned the chat-system however the project runs but in main.ts I have the same typescript error
This is impossible, what editor are you using?
I am using vs-code editor
I tried vscode, it is normal and no error is reported.
The project can also start normally.
Hi @likaia,
The error is caused by inconsistent capitalization of the first letter of the type file name. In Linux, file names are strictly case-sensitive, so the error will not appear in Windows.
Hi @likaia,
The error is caused by inconsistent capitalization of the first letter of the type file name. In Linux, file names are strictly case-sensitive, so the error will not appear in Windows.
![]()
Got it. I'll change it.
Hi @likaia, The error is caused by inconsistent capitalization of the first letter of the type file name. In Linux, file names are strictly case-sensitive, so the error will not appear in Windows.
![]()
Got it. I'll change it.
Fixed, just update the version to 3.1.8
