鍍金池/ 問答/Linux  HTML/ npm start 報(bào)錯(cuò)

npm start 報(bào)錯(cuò)

npm start 報(bào)錯(cuò)
提示:

$ npm start

Starting the development server...

Failed to compile.

./src/routes/orders/AllPaidOrderListPage.js
Module build failed: TypeError: Property right of AssignmentExpression expected node to be of a type ["Expression"] but instead got null
at Array.map (<anonymous>)

這是什么問題,怎么解決?
各位老鐵幫忙看看~_~

回答
編輯回答
笨尐豬

./src/routes/orders/AllPaidOrderListPage.js這個(gè)js中有類型異常。
看看哪里寫了map方法,在map的地方找找看。

2017年7月28日 03:34
編輯回答
久愛她

你好,我今天打開一個(gè)react項(xiàng)目也是報(bào)了這個(gè)錯(cuò)誤,請問怎么解決的!

2018年1月2日 12:48
編輯回答
怣人

兄弟 ,你這個(gè)坑是怎么填的,賜教一下啊

2017年11月27日 23:17
編輯回答
黑與白

好像有兩種解決的辦法,一:刪除node_moduless文件夾和package_lock(如果有),然后 npm install ,再npm run lint;二:如果有上一版本,回退版本在編寫。。如果有更好的方法請分享下

2017年11月10日 16:11
編輯回答
寫榮

由于 babel@7 升級導(dǎo)致的 break change,transform-decorators-legacy 無需引入了
.webpackrc.js中的

extraBabelPlugins: [
  'transform-decorators-legacy',
  ['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }],
]

transform-decorators-legacy進(jìn)行刪除
詳情:鏈接描述

2018年8月30日 16:18