小编Rem*_*ost的帖子

TypeError: Cannot read property 'name' of null on export default function using react-scripts to compile

I'm facing a compilation issue, that I've managed to work-around somehow, but I'd like to understand where exactly is the problem coming from. Here is the issue:

I'm using react-create-app project to bootstrap a React project and I get the following error, at compilation time, with react-scripts (v3.1.1), when running react-scripts start:

Failed to compile.

./src/reducers/test.js
TypeError: Cannot read property 'name' of null
    at Array.filter (<anonymous>)
Run Code Online (Sandbox Code Playgroud)

The error occurs on the test.js file:

const initialArray = ['value1'];

export default …
Run Code Online (Sandbox Code Playgroud)

javascript react-scripts

5
推荐指数
0
解决办法
276
查看次数

标签 统计

javascript ×1

react-scripts ×1