Home > Web Front-end > uni-app > body text

How to install scaffolding in uniapp

coldplay.xixi
Release: 2023-01-13 00:44:21
Original
5956 people have browsed it

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.

How to install scaffolding in uniapp

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
Copy after login

2. Create project

vue create -p dcloudio/uni-preset-vue my-project
Copy after login

3. Start the project (WeChat applet as an example)

npm run dev:mp-weixin
Copy after login

4. Open the WeChat applet developer tool to import the project

How to install scaffolding in uniapp

##If you execute the second step, an error message will be reported: vue: Unable to load the file

Solution:

Open Windows PowerShell as an administrator, execute the set-ExecutionPolicy RemoteSigned command, then write an A, and then execute vue -V

The 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 message

Just restart the project

Related free learning recommendations:

Programming video

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template