小编Car*_*man的帖子

材料-ui对React 15.4.0的破坏性变化的反应?"无法解析模块'react/lib/EventPluginHub'"

React v 15.4.0今天早上发布,似乎包含了一个修改了react-tap-event-plugin v1.0.0的更改产生了这个错误:

$ npm build
> myProject@0.1.47 build /.../myProject
> node scripts/build.js
Creating an optimized production build...
Failed to create a production build. Reason:
Module not found: Error: Cannot resolve module 'react/lib/EventPluginHub' in /.../myProject/node_modules/react-tap-event-plugin/src
Run Code Online (Sandbox Code Playgroud)

(注意:我稍微清理了输出)

根据THIS react-tap-event问题日志版本2.0.0的react-tap-event修复了构建问题.但是,material-ui仍然使用react-tap-event 1.0.0版.这里有什么选择?我能想到的唯一选择是:

  • 降级反应和其他包,如上面的链接所述
  • 等待Material-UI升级到react-tap-event 2.0.0

还有其他解决方案吗?据我所知,如果我想使用反应15.4.0,我几乎死在水中.

reactjs material-ui

16
推荐指数
2
解决办法
5405
查看次数

FB.init(...)错误:"应用程序配置不允许给定URL."

我正在尝试按照这里的教程.但是,当我使用看似有效且正确的参数调用FB.init(...)时,我收到错误消息:" 应用程序配置不允许给定URL:不允许一个或多个给定URL应用程序的设置.它必须与网站URL或Canvas URL匹配,或者域必须是其中一个应用程序域的子域. "我已经搜索(1 2)此错误,但其他人似乎只是设置有问题Facebook应用程序配置的站点URL.我99%肯定我已经正确设置了 - 但显然我做错了.

这是我的代码导致问题.出于隐私原因,我已将"XXX"和"YYY"替换为部分信息.

<html>
<body>
<h1>Facebook</h1>
<div id="fb-root"></div>
<script>
  // Additional JS functions here
  window.fbAsyncInit = function() {
    FB.init({
      appId      : 'XXX', // App ID
      channelUrl : '//YYY.com/channel.html', // Channel File
      status     : true, // check login status
      cookie     : true, // enable cookies to allow the server to access the session
      xfbml      : true  // parse XFBML
    });

  };//window.fbAsyncInit()

  // Load the SDK Asynchronously
  (function(d){
     var js, id = 'facebook-jssdk', …
Run Code Online (Sandbox Code Playgroud)

facebook init

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

facebook ×1

init ×1

material-ui ×1

reactjs ×1