I'm currently diving into Vue for the first time and have been following along with this helpful tutorial on testing. Everything was going smoothly until I encountered a perplexing error during the final step of utilizing 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
In my test file, this is the snippet of code causing trouble:
import { mount } from 'avoriaz';
import List from '@/components/List';
import Vue from 'vue';
...
Additionally, here's an excerpt from my package.json
file:
...
},
"dependencies": {
"vue": "^2.3.3",
"vue-router": "^2.6.0"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"avoriaz": "^2.6.3",
...
I attempted to fix the issue by deleting the node_modules
directory and package-lock.json
, then reinstalling everything using npm install
, but unfortunately that didn't solve the problem.
If anyone has insights on why this error is occurring and how to troubleshoot it, I would greatly appreciate your assistance!