當前位置:外匯行情大全網 - 外匯匯率 - 解決Could not find a declaration file for module 'vue-xxx'問題

解決Could not find a declaration file for module 'vue-xxx'問題

Could not find a declaration file for module 'vue-json-pretty'. '/Users/apple/Desktop/workspace/H5/vue/packapp/node_modules/vue-json-pretty/lib/vue-json-pretty.js' implicitly has an 'any' type. Try npm i --save-dev @types/vue-json-pretty if it exists or add a new declaration (.d.ts) file containing declare module 'vue-json-pretty';

為了避免這個問題,我只是用標準 require() 替換它

This error occured because of vue-xxxxxx has been generated in JavaScript.

為了避免這個問題,我只是在 tsconfig.json 中修改了這些行

現在您可以使用 import 語句,如下所示

參考文章

  • 上一篇:朝花夕拾父親的病佳句賞析
  • 下一篇:世界足球歷史上最有特點的“裁判”是哪幾位?
  • copyright 2024外匯行情大全網