node.js - 我用react-redux寫的項(xiàng)目,在控制臺(tái)release -cw的時(shí)候顯示錯(cuò)誤了,但是還是能繼續(xù)執(zhí)行(更新了)
問(wèn)題描述
標(biāo)題不能寫的太長(zhǎng),我重新說(shuō)明一下我的問(wèn)題吧:)我用react-redux寫了一個(gè)項(xiàng)目,在控制臺(tái)發(fā)布的時(shí)候(-cw監(jiān)聽(tīng)了),改著改著,就報(bào)錯(cuò)了
Ω [BABEL] Note: The code generator has deoptimised the styling of '/node_modues/antd/dist/antd.js' as it exceeds the max of '100KB'. [ERROR] Cannot read property ’substr’ of undefined
當(dāng)時(shí)我也沒(méi)有管他,就繼續(xù)改了,發(fā)現(xiàn)頁(yè)面也是可以更新,有變化。然后,我把release -cw關(guān)了,再重新fis3 release 就錯(cuò)誤了,不能下去了(Warning不用管)
E:mavenWorkspacelabsforceFrontEndmodules>fis3 release -cw [INFO] Currently running fis3 (E:SoftwareNodejsnode_globalnode_modules.fis3_npminstallfis33.4.17fis3) δ 1736ms δ 0ms Ω ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. [WARNI] Can’t resolve `id` in file [/static/js/require.js], did you miss `npm install id`?.......................................................................................................................................................................................................................................... [WARNI] Can’t resolve `libs/scrollspy` in file [/widget/sidebarmenus/sidebarmenus.js], did you miss `npm install libs`?..... [WARNI] Can’t resolve `xhr2` in file [/node_modules/reqwest/reqwest.js], did you miss `npm install xhr2`?..............................[BABEL] Note: The code generator has deoptimised the styling of '/node_modules/antd/dist/antd.js' as it exceeds the max of '100KB'. [ERROR] Cannot read property ’substr’ of undefined
請(qǐng)問(wèn),我的問(wèn)題出現(xiàn)的原因是什么呢?心好累
問(wèn)題解答
回答1:已找到問(wèn)題的原因,原來(lái)是
import {Button,Input,DatePicker,Form} from ’antd’
出現(xiàn)了問(wèn)題,不能這么合起來(lái)寫,可能會(huì)有各種問(wèn)題,強(qiáng)烈建議不要偷懶,分開(kāi)來(lái)寫,最宜!!ps.下方的代碼引用是正確的!!
import Button from ’antd/lib/button’;import Input from ’antd/lib/input’;import DatePicker from ’antd/lib/date-picker’;import Form from ’antd/lib/form’;
