Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maoOS 构建client报错 #1219

Open
shifengdiy opened this issue Jul 17, 2019 · 2 comments
Open

maoOS 构建client报错 #1219

shifengdiy opened this issue Jul 17, 2019 · 2 comments

Comments

@shifengdiy
Copy link

版本号

~ 1.7.1

什么问题

~ 运行npm run build-client构建报错,貌似可以构建出文件,但是会报错停止

如何复现此问题

~
✖ 1 problem (1 error, 0 warnings)
报错信息

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

/Users/shifeng/Documents/work/yapi/vendors/client/containers/Project/Interface/InterfaceCol/InterfaceColContent.js
  170:9  error  componentWillMount is deprecated since React 16.999.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
  468:9  error  componentWillReceiveProps is deprecated since React 16.999.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/ModalPostman/index.js

/Users/shifeng/Documents/work/yapi/vendors/client/components/ModalPostman/index.js
  64:3  error  componentWillMount is deprecated since React 16.999.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/containers/Project/Interface/InterfaceList/Run/AddColModal.js

/Users/shifeng/Documents/work/yapi/vendors/client/containers/Project/Interface/InterfaceList/Run/AddColModal.js
  44:3  error  componentWillMount is deprecated since React 16.999.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
  49:3  error  componentWillReceiveProps is deprecated since React 16.999.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/ModalPostman/VariablesSelect.js

/Users/shifeng/Documents/work/yapi/vendors/client/components/ModalPostman/VariablesSelect.js
  79:9  error  componentWillReceiveProps is deprecated since React 16.999.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

✖ 1 problem (1 error, 0 warnings)


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yapi-vendor@1.7.1 build-client: `NODE_ENV=production ykit pack -m`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yapi-vendor@1.7.1 build-client script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/shifeng/.npm/_logs/2019-07-17T08_10_50_615Z-debug.log

什么浏览器

~ Chrome浏览器

什么系统(Linux, Windows, macOS)

macOS 10.14

@shifengdiy
Copy link
Author

已解决,是eslint错误导致程序退出,在eslintrc中加入 "react/no-deprecated": ["off"] 消除错误

@cheny-github
Copy link

舒服了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants