Install uni-app via vue-cli command line

Install vue-cli globally

npm install -g @vue/cli

Use the official version (corresponding to the latest official version of HBuilderX)

view create -p dcloudio / uni-preset-view my-project

 

 

Startup project

If sass is used in the project then continue the installation below

Install sass dependency package

npm install --save-dev sass-loader

sass-loader depends on node-sass, so install node-sass

npm install --save-dev node-sass

The following error may occur when installing node-sass

 

 

 Solution

Copy the .node file download link from the command line and open the download file in the browser

https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-64_binding.node

After the file is successfully downloaded, enter the following command in the command line tool:

set SASS_BINARY_PATH=D:/360Downloads/win32-x64-64_binding.node

Configuration is complete and reinstall

npm i node-sass

 

Guess you like

Origin www.cnblogs.com/binmengxue/p/12697546.html