简体   繁体   English

react-stepzilla 和 React 16

[英]react-stepzilla and React 16

I am attempting to make use of react-stepzilla, but am getting an error when I install the package:我正在尝试使用 react-stepzilla,但是在安装软件包时出现错误:

react-stepzilla@4.7.2 requires a peer of react@^15.5.4 but none is installed. react-stepzilla@4.7.2 需要 react@^15.5.4 的同级,但没有安装。 You must install peer dependencies yourself.您必须自己安装对等依赖项。

I am using "react": "^16.5.2",我正在使用"react": "^16.5.2",

Is the issue here that stepzilla doesn't support React 16.x?这里是 stepzilla 不支持 React 16.x 的问题吗? And is there a way around this?有没有办法解决这个问题?

At runtime, I get the error:在运行时,我收到错误:

ERROR in ./node_modules/react-stepzilla/dist/main.js Module not found: Error: Can't resolve 'promise' in 'D:\\Software Development\\Repositories\\GitHub\\MyProj\\node_modules\\react-stepzilla\\dist' @ ./node_modules/react-stepzilla/dist/main.js 21:15-33 ./node_modules/react-stepzilla/dist/main.js 中的错误未找到模块:错误:无法解析“D:\\Software Development\\Repositories\\GitHub\\MyProj\\node_modules\\react-stepzilla\\dist”中的“promise” @ ./node_modules/react-stepzilla/dist/main.js 21:15-33

I also see this in the editor:我也在编辑器中看到了这一点: 在此处输入图片说明

Since this question was asked a long time ago, it appears that react-stepzilla has been updated.由于很久以前就提出了这个问题,因此 react-stepzilla 似乎已更新。 It now requires a peer dependency of React 16.4.1.它现在需要 React 16.4.1 的对等依赖项。 If you tried this again today it would probably not be an issue.如果你今天再试一次,这可能不是问题。

It was indeed the peer dependency that was causing the issue.确实是对等依赖导致了这个问题。 There's no convenient way around that, though there are a few ways of dealing with it.没有方便的方法来解决这个问题,尽管有几种方法可以处理它。 This question has details on how to handle peer dependency version conflicts .这个问题有关于如何处理对等依赖版本冲突的详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM