0
我试图在JavaScript中创建ES6模块,并且出现如下错误:Line 20: "NotFound" is read-only while parsing file
。Gulp投掷“解析文件时为只读”错误,同时运行Gulp任务
NotFound
是我的模块的名称。
'use strict';
import React from 'react';
const NotFound = React.createClass({
render: function() {
return (
<h1>Not Found!</h1>
);
}
});
export default NotFound;
我将其导入方式如下:import NotFound from './components/NotFound';
如何解决这个问题?将文件权限更改为777完全没有帮助(我知道这是不正确的,但我试图找到解决方案)。