[英]Module not found: Error: Can't resolve 'avoriaz'
I'm new to Vue and am learning how to test it from this tutorial . 我是Vue的新手,正在学习如何通过本教程进行测试。 I've reached the end of the tutorial but am getting a strange error on the last step of using avoriaz
: 我已经完成了本教程的结尾,但是在使用avoriaz
的最后一步出现一个奇怪的错误:
ERROR in ./test/unit/specs/list.spec.js
Module not found: Error: Can't resolve 'avoriaz' in
'/local/path/to/vuejs-
testing/test/unit/specs'
@ ./test/unit/specs/list.spec.js 3:15-33
@ ./test/unit/specs \.spec$
@ ./test/unit/index.js
Here's the relevant code in my test file: 这是我的测试文件中的相关代码:
import { mount } from 'avoriaz';
import List from '@/components/List';
import Vue from 'vue';
...
And my package.json
file: 还有我的package.json
文件:
...
},
"dependencies": {
"vue": "^2.3.3",
"vue-router": "^2.6.0"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"avoriaz": "^2.6.3",
...
I tried removing my node_modules
directory and package-lock.json
and reinstalling everything with npm install
to no avail. 我试图删除我的node_modules
目录和package-lock.json
并使用npm install
重新安装所有内容,但无济于事。
Any ideas as to what could be causing this, and how to resolve it? 关于什么可能导致这种情况以及如何解决的任何想法?
I have been using Avoriaz for a while, and also have encountered the same issue since the latest update since yesterday. 我已经使用Avoriaz一段时间了,自昨天以来的最新更新以来也遇到了相同的问题。
I believe it's caused by same bugs in the module itself. 我相信这是由模块本身中的相同错误引起的。 Submitted an issue to their Github repo already. 已向其Github存储库提交了问题。
Edited: problem fixed by author in version 2.6.5 编辑:作者在版本2.6.5中解决的问题
author of avoriaz here. 这里是avoriaz的作者。 This was a bug with avoriaz 2.6.3, it's fixed in 2.6.5. 这是avoriaz 2.6.3的错误,已在2.6.5中修复。
The problem was I switched the way the file was exported. 问题是我切换了文件导出方式。 This caused problems for most users. 这给大多数用户带来了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.