Skip to main content

3.Npm 报错汇总

报错:npm WARN EBADENGINE Unsupported engine

解决方案: node版本不匹配,一般时版本太低,按照提示下载对应版本就行。

参考:https://stackoverflow.com/questions/70269056/what-is-the-cause-of-npm-warn-ebadengine

报错:docusaurus: command not found

解决方案: 编译前需要下载包,使用install命令下载包

npm install
npm run build

参考: https://stackoverflow.com/questions/70835895/docusaurus-command-not-found-when-running-npm-run-start-to-host-the-server

报错:"error:0308010C:digital envelope routines::unsupported"

解决方案:Enable legacy OpenSSL provider.

export NODE_OPTIONS=--openssl-legacy-provider

参考:https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported