YMFE / yapi

YApi 是一个可本地部署的、打通前后端及QA的、可视化的接口管理平台
http://yapi.smart-xwork.cn/
Apache License 2.0
27.19k stars 4.77k forks source link

二次开发,下载依赖后,编译client反复报错,是否为node-sass版本问题? #2577

Open mmdapl opened 1 year ago

mmdapl commented 1 year ago

版本号

~ 1.9.2

什么问题

~ 编译构建client的时候出错

[error] ./client/containers/Project/Interface/InterfaceCol/InterfaceColMenu.js

Desktop/github/mmdapl/yapi_system/client/containers/Project/Interface/InterfaceCol/InterfaceColMenu.js 106:3 error componentWillMount is deprecated since React 16.9.0, use UNSAFE_componentWillMount instead, see https://reactjs.org/docs/react-component.html#unsafe_componentwillmount. Use https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles to automatically update your components react/no-deprecated 110:3 error componentWillReceiveProps is deprecated since React 16.9.0, use UNSAFE_componentWillReceiveProps instead, see https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops. Use https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles to automatically update your components react/no-deprecated

✖ 2 problems (2 errors, 0 warnings)

[error] ./client/components/Postman/Postman.js

/Desktop/github/mmdapl/yapi_system/client/components/Postman/Postman.js 274:3 error componentWillMount is deprecated since React 16.9.0, use UNSAFE_componentWillMount instead, see https://reactjs.org/docs/react-component.html#unsafe_componentwillmount. Use https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles to automatically update your components react/no-deprecated 287:3 error componentWillReceiveProps is deprecated since React 16.9.0, use UNSAFE_componentWillReceiveProps instead, see https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops. Use https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles to automatically update your components react/no-deprecated

✖ 2 problems (2 errors, 0 warnings)

[error] ./exts/yapi-plugin-advanced-mock/MockCol/MockCol.js

Desktop/github/mmdapl/yapi_system/exts/yapi-plugin-advanced-mock/MockCol/MockCol.js 46:3 error componentWillMount is deprecated since React 16.9.0, use UNSAFE_componentWillMount instead, see https://reactjs.org/docs/react-component.html#unsafe_componentwillmount. Use https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles to automatically update your components react/no-deprecated

✖ 1 problem (1 error, 0 warnings)

[error] ./client/contain

如何复现此问题

~ node版本 v10.24.1 npm 版本 6.14.12 node-sass -v node-sass 4.9.0 (Wrapper) [JavaScript] libsass 3.5.4 (Sass Compiler) [C/C++]

**尝试切换过高版本的node-sass依然编译报错

拉取仓库的文件,npm i安装后,运行编译,反复报错,是否为react版本问题;

官方有可以二次开发的教程嘛?? 主要是模块的版本依赖问题**

什么浏览器

~

什么系统(Linux, Windows, macOS)

mac 和linux docker都有尝试过

tmlx1990 commented 1 year ago

你试试node14 看看 我目前node14.20可以

mmdapl commented 1 year ago

我后来使用node 10.24.1 重新安装node-sass 然后锁版本package-lock.json 可行