One, import:

In my own Vue project, I tried to use MockJS + mock-Server but got an error.

Recently, I looked at the vue-element-admin code. Mockjs + mock-server.js is used. You also want to use MockJS + mock-server.js in your own Vue projects. But errors were reported frequently.

Error as follows:

Node version 13. Node Verison 13.2.0 officially supports ES Modules. Install a higher version of Node using NVM, and you have this document.

Note: An error will still be reported if you use Node 14.17.5 to run your project. It’s something else, not the Node version.

NPM cannot be used after node installation

A message is displayed indicating that Node 14.17.5 has been installed

NPM is not working

Node14.17.5 nodeJS is not found in the NVM directory

Iii Solutions:

Create a v14.17.5 in the NVM directory

Enter where NVM on the CLI to quickly check the directory in which the NVM is installed

Download 14.17.5 node zip file from Node (I’m Windows) Move the files to the v14.17.5 directory A success

Three: link

– NPM cannot be found after installing NVM on Windows.