This article has participated in the activity of “New person creation Ceremony”, and started the road of digging gold creation together.

Ruoyi-vue-activiti was chosen mainly because it has a workflow. During the construction process, some problems were encountered and solved.

Set up the environment

  1. System: Windows 10 64-bit
  2. IDEA version: IntelliJ IDEA 2020.2.2×64
  3. Git address: gitee.com/smell2/ruoy…
  4. Time: 2022-01-14

Precautions for Background Startup

  1. First build the database Ruoyi-Vue-Activiti7, run the SQL file under the SQL folder; Change the mysql database connection (database name, database user name and password) in the application-dev.yml file under ruoyi-admin.
  2. Install redis and start, redis default port 6397 need not change, the local machine can run.
  3. Open the project ruoyi-vue-activiti. Maven dependencies are slow to download and may require multiple refreshes.
  4. Start classes start: under ruoyi – admin module SRC/main/com ruoyi/RuoYiApplication

The front-end Ruoyi-UI environment is configured from zero and then started

Configure the front-end Vue running environment

(1) Download the node.js version for your system:Nodejs.org/en/download…To install

The first time I installed Node.js was the latest version, but when I tried NPM install on my project, I got an error and could not install it. The reason is that the node.js version and the Node-sass version are not the same. The following is a list of versions. This requires special attention.

NodeJS Supported node-sass version Node Module
Node 15 5.0 + 88
Node 14 4.14 + 83
Node 13 + 4.13, < 5.0 79
Node 12 4.12 + 72
Node 11 + 4.10, < 5.0 67
Node 10 4.9 + 64
Node 11 4.5.3 +, < 5.0 57

When installing NPM install on Ruoyi-UI on 14 January 2022, node-sass will now install 4.14 by default, so you need to find a version of Node.js14 to install. Note that the default installation of Node-sass will change as the version is upgraded

(2) Node environment configuration

The path of the global module installed by NPM and the path of the cache cache are configured. NPM Install Express -g (-g, g) installs the module to the [C: Users\ User Name \AppData\Roaming\ NPM] path, occupying disk C space.

Create two folders node_global and node_cache in D: Program Files nodejs. Open the CMD command window and enter

npm config set prefix “D:\Program Files\nodejs\node_global”

npm config set cache “D:\Program Files\nodejs\node_cache”

Create [NODE_PATH] under [system Variables], type [D: Program Files\nodejs\node_global\node_modules], C:\Users\ Users\ AppData\ NPM > D:\Program Files\nodejs\node_global

(3) After configuring the test, install a Module test, we will install the most commonly used Express module, open CMD window, install a module test

npm install express -g

I encountered an error here

npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D:\Program Files\nodejs\node_cache\_cacache
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'D:\Program Files\nodejs\node_cache\_cacache'
npm ERR!  [OperationalError: EPERM: operation not permitted, mkdir 'D:\Program Files\nodejs\node_cache\_cacache'] {
npm ERR!   cause: [Error: EPERM: operation not permitted, mkdir 'D:\Program Files\nodejs\node_cache\_cacache'] {
npm ERR!     errno: -4048,
npm ERR!     code: 'EPERM',
npm ERR!     syscall: 'mkdir',
npm ERR!     path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache'
npm ERR!   },
npm ERR!   isOperational: true,
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'D:\\Program Files\\nodejs\\node_cache\\_cacache'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
Copy the code

Go to the nodeJS folder and right-click – Properties to change folder permissions.

Install vue environment vue.js

npm install vue -g

Install the vue – the router

npm install vue-router -g

Install vUE foot bracket

npm install vue-cli -g

(4) Use IDEA to open the project, install the environment and start the project

Open Terminal, enter Ruoyi-UI, install dependency, normal

npm install –registry=registry.npm.taobao.org

The service is started and no error is reported

npm run dev

You can visit http://localhost:80/

The first problem is that the node.js version does not match the Node-sass version, so other dependencies cannot be installed. Here, it is reminded that you must go to the log file to locate the problem. The problem displayed in Terminal may not be the real root problem. This version mismatch is not shown in Terminal, which shows gyp ERR! Stack Error: Can’t find Python executable “Python “, you Can set the Python env variable. In the log file, it becomes clear that the Node.js version does not match the Node-sass version.

Swagger UI access path http://localhost/dev-api/swagger-ui.html after successful startup