reactjs-tsdx问题-使用模板react with stoybook创建项目失败
发布时间:2022-08-08 17:46:53 314
相关标签: # node.js
我想用 Storybook 和 React 创建 UI 组件库。这是我第一次使用 Storybook,我只是按照文档中的说明进行操作: https://tsdx.io/#quick-start
- 我npx tsdx create my-components在终端输入
- 终端让我选择模板,我选择了 react-with-storybook
该项目开始安装打包,然后在安装过程中卡住了。我等了大约半个小时才抛出错误消息,如下所示:
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN dev react-dom@"*" from the root project
npm WARN 5 more (react-element-to-jsx-string, @storybook/theming, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: mycomponents@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN dev react@"*" from the root project
npm WARN 6 more (react-syntax-highlighter, ...)
由于错误消息太长,我只复制并粘贴了其中的一部分。
我将节点更新为16.16.0和npm 8.11.10。
有人知道出了什么问题吗?我该如何解决这个问题?
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报