Home  >  Article  >  Web Front-end  >  How to install scaffolding in uniapp

How to install scaffolding in uniapp

coldplay.xixi
coldplay.xixiOriginal
2020-12-09 16:48:165898browse

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

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

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!

Statement:
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