解决:根目录新建babel.config.js加入如下内容

module.exports = {
presets: [ "@babel/preset-env", "@babel/preset-react" ],
plugins: [ "@babel/plugin-transform-arrow-functions", "@babel/plugin-proposal-class-properties" ]
}

箭头函数报错:Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.的更多相关文章

  1. JQ 关于each() 箭头函数报错的问题

  2. js执行函数报错Cannot set property 'value' of null怎么解决?

    js执行函数报错Cannot set property 'value' of null 的解决方案: 原因:dom还没有完全加载 第一步:所以js建议放在body下面执行, 第二步:window.on ...

  3. python 3 直接使用reload函数报错

    reload()是python2 的内置函数可以直接使用,但是python3 直接使用此函数报错,需要导入importlib 模块 from importlib import reload

  4. Linux 下使用C语言 gets()函数报错

    在Linux下,使用 gets(cmd) 函数报错:warning: the 'gets' function is dangerous and should not be used. 解决办法:采用 ...

  5. C++ socket bind()函数报错 不存在从 "std::_Binder<std::_Unforced, SOCKET &, sockaddr *&, size_t &>" 到 "int" 的适当转换函数

    昨天还可以正常运行的程序,怎么今天改了程序的结构就报错了呢?我明明没有改动函数内部啊!!! 内心无数只“草泥马”在奔腾,这可咋办呢?于是乎,小寅开始求助于亲爱的度娘...... 由于小寅知识水平有限, ...

  6. 光流法draw_flow()函数报错

    光流法draw_flow()函数报错 import cv2 from scipy import * def draw_flow(im, flow, step=16): ""&quo ...

  7. updatexml和extractvalue函数报错注入

    updatexml()函数报错注入 updatexml (XML_document, XPath_string, new_value); 第一个参数:XML_document是String格式,为XM ...

  8. Apache报错信息之Invalid command 'Order', perhaps misspelled or defined by a module not included in the server config

    今天配置开启Apache虚拟主机时, 然后日志报错提示: Invalid command 'Order', perhaps misspelled or defined by a module not ...

  9. git push报错error: failed to push some refs to 'git@github.com'

    git push报错error: failed to push some refs to 'git@github.com' $ git push -u origin master To git@git ...

随机推荐

  1. POJ 3525 /// 半平面交 模板

    题目大意: 给定n,接下来n行逆时针给定小岛的n个顶点 输出岛内离海最远的点与海的距离 半平面交模板题 将整个小岛视为由许多半平面围成 那么以相同的比例缩小这些半平面 一直到缩小到一个点时 那个点就是 ...

  2. 1.springboot+ActiveMQ

    1.项目结构如下 pom.xml文件如下 <dependencies> <dependency> <groupId>junit</groupId> &l ...

  3. log4j学习(二) 高并发logback

    logback中常用的appender有ch.qos.logback.core.ConsoleAppender和ch.qos.logback.core.rolling.RollingFileAppen ...

  4. 使用Photoshop+960 Grid System模板进行网页设计

    前几天彬Go和大家一起讨论了960 Grid System这个CSS网格系统框架的基本原理和使用方法.今天,暴风彬彬将教大家使用Photoshop结合960 Grid System模板来设计一个真正符 ...

  5. Spring注解基础学习总结

    1.依赖注入注解: @Component:Bean注入到Spring容器组件(通用) @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE):Bean作用域( ...

  6. 【JZOJ6271】锻造 (forging)

    description analysis 首先看一下\(p=1\),即\(1\)以后的合成一定成功的情况 如果按照求期望值的一般做法求两把\(0\)合成\(1\)的期望,会画出一棵无穷大的树 这个的期 ...

  7. Ros node启动与关闭

    1. ros运行单位: Ros程序运行的单位是ros node. 2. ros 节点的启动: (1)初始化ros节点:通过调用ros::init()接口实现:可以通过参数指定默认节点名字,之所以是默认 ...

  8. swoole手册

    https://wiki.swoole.com/wiki/ Swoole Github项目地址:https://github.com/swoole/swoole-src/ (支持请点Star) 开源中 ...

  9. ON_EVENT 报错

    错误提示: error C2440: 'initializing' : cannot convert from 'const wchar_t [1]' to 'UINT' error C2440: ' ...

  10. VS2008编译出现问题:error C2485: “__restrict”: 无法识别的扩展属性 解决办法

    错误:Error3 error C2485: '__restrict' : unrecognized extended attribute f:\program files\microsoft vis ...