Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 是什么原因引起的;“模块解析失败”;如何修复它?_Reactjs_Webpack_Create React App_Admin On Rest - Fatal编程技术网

Reactjs 是什么原因引起的;“模块解析失败”;如何修复它?

Reactjs 是什么原因引起的;“模块解析失败”;如何修复它?,reactjs,webpack,create-react-app,admin-on-rest,Reactjs,Webpack,Create React App,Admin On Rest,我用create react app创建了一个项目,我正在用admin on rest软件包使用这个应用 当我运行纱线启动时,我收到以下错误消息: ./~/admin-on-rest/src/mui/input/TextInput.js Module parse failed: /path/to/app/Resources/backend/node_modules/admin-on-rest/src/mui/input/TextInput.js Unexpected token (21:15

我用
create react app
创建了一个项目,我正在用
admin on rest
软件包使用这个应用

当我运行
纱线启动
时,我收到以下错误消息:

./~/admin-on-rest/src/mui/input/TextInput.js
Module parse failed: 

/path/to/app/Resources/backend/node_modules/admin-on-rest/src/mui/input/TextInput.js Unexpected token (21:15)
You may need an appropriate loader to handle this file type.
|  */
| export class TextInput extends Component {
|     handleBlur = (eventOrValue) => {
|         this.props.onBlur(eventOrValue);
|         this.props.input.onBlur(eventOrValue);
导致该错误消息的行是:

|     handleBlur = (eventOrValue) => {

我应该添加哪个加载程序?如何添加它?

检查这个:这一个也是:@MayankShukla我做了
纱线弹出
,然后用
纱线添加巴贝尔插件转换类属性添加了依赖项。我编辑了我的
package.json
,将
babel插件转换类属性添加到插件列表中。我重新运行了
warn start
,但仍然收到相同的错误消息:我的IDE从“admin on rest/src/…”目录而不是从传输版本创建导入。因此产生了这个bug。检查这个:@MayankShukla I做了
纱线弹出
,然后用
纱线添加巴贝尔插件转换类属性添加了依赖项。我编辑了我的
package.json
,将
babel插件转换类属性添加到插件列表中。我重新运行了
warn start
,但仍然收到相同的错误消息:我的IDE从“admin on rest/src/…”目录而不是从传输版本创建导入。因此产生了这个bug。