-
Notifications
You must be signed in to change notification settings - Fork 0
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
<script setup lang="ts"> 时vscode提示错误 #1
Comments
哦哦,我默认用的 typescript ,这个下载到的就是 js 文件,没有 .d.ts 文件,你直接忽略这个模块,或者 declare module 一下就行 |
声明上了这个declare module 'AMapWX'; 不起作用. |
那我们干脆这样写 // @ts-ignore
import amapFile from '../../lib/amap-wx.130.js' 高德地图这个 sdk 的确官方没有给 .dts 文件,自己维护也挺烦的 |
又发现一个问题 npm run dev:mp-weixin 时 无法加载模块 |
你是用的我这个 |
不好意思,忘记配置vite.config.ts了 可以了 谢谢! |
不好意思,编译没问题,运行又出问题了。。。 运行你的demo 加上<script setup lang="ts"> 也是这个结果,你下班可以看看,顺便写个ts的demo吧。 |
明天我试试,谢谢 |
本地版本信息: ➜ uni-app-vue3-for-amap-wx git:(main) ✗ npm --version |
我怀疑是nodejs 版本的问题,我的 nodejs版本是 16 |
➜ uni-app-vue3-for-amap-wx git:(main) ✗ node -v |
额,nodejs我自己是不用奇数版本的.....你这个问题我去看看issue把 |
我改回node 16试试 |
rollup/plugins#986 |
试了下,跟nodejs版本没有关系,node 16版本问题依旧存在,确实是插件的版本的问题, "@rollup/plugin-commonjs": "21.1.0" 问题解决。 |
无法找到模块“@/lib/amap-wx.130.js”的声明文件
The text was updated successfully, but these errors were encountered: