简体   繁体   English

React 找不到模块

[英]React can't find Module

I'm trying to install a package called 'react-stepzilla'.我正在尝试安装一个名为“react-stepzilla”的软件包。 I've installed and saved this via NPM and made sure this is included in the .package-json file.我已经通过 NPM 安装并保存了它,并确保它包含在 .package-json 文件中。 All of the files are there too.所有文件也都在那里。

I've included the following at the top of my main Component... import StepZilla from 'react-stepzilla';我在主组件的顶部包含了以下内容... import StepZilla from 'react-stepzilla';

But all I get is this message... https://i.stack.imgur.com/M96Au.png但我得到的只是这条消息...... https://i.stack.imgur.com/M96Au.png

So I think it's looking in the wrong place for the module.所以我认为它在模块的错误位置。 How do I sort that out?我该如何解决?

There is no "dist" folder in the NPM package so the module can't be used in a project. NPM 包中没有“dist”文件夹,因此该模块不能在项目中使用。

Current issue on Github Github 上的当前问题

Apologies for this...对此深表歉意...

There was some regression and the 'dist' folder got left out in a new build.有一些回归,“dist”文件夹在新版本中被遗漏了。

It will work now.它现在会起作用。 https://github.com/newbreedofgeek/react-stepzilla/issues/7 is closed. https://github.com/newbreedofgeek/react-stepzilla/issues/7已关闭。

Make sure you run npm update react-stepzilla to get the latest version.确保运行npm update react-stepzilla以获取最新版本。

tnx, newbreedofgeek (react-stepzilla author) tnx,newbreedofgeek(react-stepzilla 作者)

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

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