I am trying to integrate mocha as a unit testing plugin into my existing Vue project, which was set up using CLI 3 (vue create myProj).
This pertains to Vue CLI version 3.0.0 and above, in which my current project is operating.
Here is the error message I encounter when running the command:
~$ vue add unit-mocha
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/vue-cli-plugin-unit-mocha - Not found
npm ERR! 404
npm ERR! 404 'vue-cli-plugin-unit-mocha@latest' is not in the npm registry.
npm ERR! 404 You should notify the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http URL, or git URL.
npm ERR! A detailed log of this operation can be found at:
npm ERR! C:\Users\Piktorlabs\AppData\Roaming\npm-cache\_logs\2019-11-04T10_03_45_315Z-debug.log
ERROR command failed: npm install --loglevel error -D vue-cli-plugin-unit-mocha
Therefore, based on the NPM documentation available at https://www.npmjs.com/package/@vue/cli-plugin-unit-mocha,
The instructions suggest running the command ~$ vue add unit-mocha to incorporate the mocha unit testing plugin into an existing project. However, I am encountering a 404 error in the CLI indicating that the specified npm directory does not exist.