首页 > 其他 > 详细

node+react 打包成功,控制台报错

时间:2018-02-23 18:16:26      阅读:253      评论:0      收藏:0      [点我收藏+]

控制台报错: ‘ReactCurrentOwner‘ of undefined

解决办法:RN版本的问题。

    

As I mentioned, make sure you‘ve installed the correct version of React. If you‘re using React Native 0.45:
yarn add react@16.0.0-alpha.12

    npm install react@16.0.0-alpha.12 --save-dev

    npm install --save-dev babel-preset-es2015

test:/\.jsx?$/,
        exclude:/node_modules/,
        loader:‘babel-loader‘,
        query:{
            presets:[‘es2015‘,‘react‘]
        }

  

Your config is

presets: [‘es2015‘, ‘react‘]

but the only preset you‘ve installed is

+-- babel-preset-es2015@6.18.0

So your answer is

npm install --save-dev babel-preset-react

    

node+react 打包成功,控制台报错

原文:https://www.cnblogs.com/detanx/p/errorSolute.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!