yarn run lint:Missing file extension "vue" for

☁  vue-admin-template [master] ⚡ yarn run lint
yarn run v1.6.0
(node:1818) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ vue-cli-service lint
error: Missing file extension "vue" for "@/components/common/Master" (import/extensions) at src/views/test/Test.vue:70:24:
  68 | </template>
  69 | <script>
> 70 | import MasterPage from '@/components/common/Master';
     |                        ^
  71 |
  72 | export default {
  73 |   components: {


1 error found.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
阅读 6.2k
1 个回答

解决了:Master要改成Master.vue加.vue后缀,太坑了

import MasterPage from '@/components/common/Master.vue';

clipboard.png

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题