问题
在 .ts
文件中引入三方模块报错.
Could not find a declaration file for module 'lodash'. 'xxx/node_modules/lodash/lodash.js' implicitly has an 'any' type. Try 'npm i --save-dev @types/lodash' if it exists or add a new declaration (.d.ts) file containing declare module 'lodash';
解决方案
方案1:
在 shims-vue.d.ts
文件中加入代码 declare module 'lodashe'
方案2:
npm i --save-dev @types/lodash