npm run serve 报错 error:0308010C:digital envelope routines::unsupported

Table of contents

1. Project file input cmd to open the terminal

 2. Enter set NODE_OPTIONS=--openssl-legacy-provider in the terminal and press Enter

 3. Enter the running command npm run serve


1. Method 1 (not recommended)

1. Project file input cmd to open the terminal

 2. Enter set NODE_OPTIONS=--openssl-legacy-provider in the terminal and press Enter

 3. Enter the running command npm run serve

Note: The above method has to be repeated every time the project is run to run 

2. Method 2 (recommended)

 

1. Add in the serve of package.json

 code:

set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve

2. Enter the running command npm run serve

Guess you like

Origin blog.csdn.net/qq_52421092/article/details/130541175