<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="vue build报错：Could not find a declaration file for module '../package/dist/vue-web-component-wrapper.es.js'. /package/dist/vue-web-component-wrapper.es.js' implicitly has an 'any' type" id="card1">
<p> 游客</p><p>
标题:vue build报错：Could not find a declaration file for module '../package/dist/vue-web-component-wrapper.es.js'. /package/dist/vue-web-component-wrapper.es.js' implicitly has an 'any' type<br/>
正文:<br/>
 D:\Camnpr git:[dev]npm run build&amp;gt; vite1@1.0.0 build&amp;gt; pnpm run type-check &amp;amp;&amp;amp; pnpm run build-only&amp;gt; vite1@1.0.0 type-check D:\Camnpr &amp;gt; vue-tsc --noEmitsrc/main.ts:10:33 - error TS7016: Could not find a declaration file for module '../package/dist/vue-web-component-wrapper.es.js'. 'D:/Camnpr/package/dist/vue-web-component-wrapper.es.js' implicitly has an 'any' type.10 import createWebComponent  from '../package/dist/vue-web-component-wrapper.es.js'                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Found 1 error in src/main.ts:10&amp;thinsp;ELIFECYCLE&amp;thinsp; Command failed with exit code 2. 解决方案：在tsconfig.json文件中添加配置： &amp;quot;noImplicitAny&amp;quot;: false,&amp;quot;allowJs&amp;quot;: true配置后，使用import &amp;quot;xxx&amp;quot; from &amp;quot;xxx&amp;quot; 语句也不会报错了。<br/><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=2296&amp;Page=1">[&lt;&lt;]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=2296&amp;Page=1">[[1]]</a><a href="http://camnpr.com/wap.asp?mode=WAP&amp;act=View&amp;id=2296&amp;Page=1">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=2296">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=2296">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://camnpr.com/wap.asp">首页</a>
</p>
</card>
</wml>