如何读取null的属性?

Moh*_*bas 3 null dependencies reactjs npm-install styled-components

在 Reactjs 中,运行 npm install 时,样式组件显示错误。虽然安装其他依赖项工作正常,但问题出在样式组件上。

\n
npm ERR!\xc2\xa0cannot read the properties of null (read "edgesOut").\nnpm ERR!\xc2\xa0A complete log of this run can be found in:\nnpm ERR! C:UsersDELLAppDataLocalnpm-cache_logs2023-05-09T07_37_18_586Z-debug-0.log\n
Run Code Online (Sandbox Code Playgroud)\n

小智 5

我也遇到过这个问题。

使用

npm install styled-components@5.3.10
Run Code Online (Sandbox Code Playgroud)

为我工作。