使用Typescript构建默认的react原生应用程序,并添加样式组件,在应用程序中引用它并尝试编译会导致以下错误:
node_modules/styled-components/typings/styled-components.d.ts(116,44):错误TS2503:找不到命名空间'NodeJS‘。
请参阅repo以进行复制。https://github.com/StevenTCramer/Issue1
发布于 2018-06-02 08:43:22
为了使用NodeJS名称空间,您需要安装带有npm的@types/node
。
$ npm install --save-dev @types/node
https://stackoverflow.com/questions/49495257
复制相似问题