How to install scaffolding in uniapp: First perform global installation; then create a project and start the project, the code is [npm run dev:mp-weixin]; finally open the WeChat applet developer tool to import the project.
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, Dell G3 computer.
Recommended (free): uni-app development tutorial
Uniapp installation scaffolding method:
1. Global installation
npm install -g @vue/cli
2. Create project
vue create -p dcloudio/uni-preset-vue my-project
3. Start the project (WeChat applet as an example)
npm run dev:mp-weixin
4. Open the WeChat applet developer tool to import the project
##If you execute the second step, an error message will be reported: vue: Unable to load the fileSolution:Open Windows PowerShell as an administrator, execute the set-ExecutionPolicy RemoteSigned command, then write an A, and then execute vue -VThe problems encountered during the construction process include inconsistent versions of vue and vue -template-complier Use the command npm install vue@correct version number according to the error messageJust restart the projectRelated free learning recommendations:
The above is the detailed content of How to install scaffolding in uniapp. For more information, please follow other related articles on the PHP Chinese website!