This article records the problems and solutions I encountered when downloading and installing " Xiaoai Admin " (based on vue2.0 +vuex+ element-ui background management system):
https://github.com/wdlhao/vue2-element-touzi-adminhttps://github.com/wdlhao/vue2-element-touzi-admin
nvm version switching
To sum up experience 1, everyone must read the document carefully before pulling the project. The first detour I took was due to not reading the document carefully.
At first, I chose to use the higher version of npm installed on this machine to install it many times, but it was unsuccessful. Later, it was not until a friend reminded me that I used the nvm version switching tool to complete the next installation steps.
nvm installation address:
Just download the above installation package. I downloaded nvm-setup.exe for the first time, but npm cannot be detected during use:
No reason was found.
I don't know the specific differences between the above compressed packages. If you know the big guys, you can answer them in the comment area.
For the above problem, my solution is to switch to the second installation package and download it again, the problem is solved, and nvm can be used normally.
Post the common commands of nvm here, so that you don’t have to work hard to learn nvm, it’s easy to get started
nvm version // 查看NVM版本,是否安装成功
nvm list available // 查看可安装的node版本
nvm list // 查看已安装的node版本
nvm install 版本号 // 安装node
nvm uninstall 版本号 // 卸载node
nvm use 版本号 // 切换使用node版本
nvm current // 当前使用node版本
nvm node_mirror [url] // 切换node镜像[https://npm.taobao.org/mirrors/node/]
nvm npm_mirror [url] // 切换npm镜像[https://npm.taobao.org/mirrors/npm/]
Project download and installation
For the installation of the entire project, in addition to referring to the project documentation, it also focuses on the solution of the following blogger:
The items you pull down may be a little different from the ones described above, like mine.
There is no node_modules文件,另外如果删除package-lock.json我这边会出现新的安装问题,所以我在重新拉取项目后没有删除package-lock.json文件,并且重新安装成功。
Follow the prompts to manually add "webpack": "^4.44.2" and execute npm install to install it.
Finally, the implementation encountered new problems:
Syntax Error: Error: Cannot find module 'cache-loader'
This error message appears when compiling the vue template, and the specific error is that cache-loader
the module cannot be found. It may be that this module is not installed or configured correctly.
implement:
npm install cache-loader --save-dev
The installation is complete.