I recently added a package called htmldiff to my Vue project using the npm install command. The next step was to try importing the package into one of my components.
import { diff } from 'htmldiff'; // note that the package does not use default export
However, I encountered an error message:
This dependency was not found:
* htmldiff in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Editor3.vue?vue&type=script&lang=js&
To resolve this, you can run: npm install --save htmldiff
Upon checking the project's package.json file, I confirmed that htmldiff is included. Furthermore, the main file for htmldiff is specified in its package.json as follows:
"main": "htmldiff.js",
Is there anything else I should investigate to solve this issue?