【发布时间】:2021-04-17 12:55:25
【问题描述】:
我正在使用 webpack、React.js 和 Visual Studio 开发一个小项目。重命名、删除和创建名为 xxx.js 的某个文件后,出现错误:
ERROR in No files matching 'C:\MyPath\src\ViewLayer\xxx.js' were found.
Failed to compile.
No issues found.
可能是什么问题?
【问题讨论】:
我正在使用 webpack、React.js 和 Visual Studio 开发一个小项目。重命名、删除和创建名为 xxx.js 的某个文件后,出现错误:
ERROR in No files matching 'C:\MyPath\src\ViewLayer\xxx.js' were found.
Failed to compile.
No issues found.
可能是什么问题?
【问题讨论】:
就我而言,我发现C:\MyPath\src\ViewLayer\xxx.js 存在于C:\MyPath\public\stats.json 中。我删除了这个文件并以常规方式重新启动了项目:
npm start
它已经奏效了。错误消失了。现在我有:
Compiled successfully.
No issues found.
这是一个怪异的世界:-)
【讨论】: