在進(jìn)行Eggjs項(xiàng)目開發(fā)時(shí),經(jīng)常遇到明明已經(jīng)實(shí)現(xiàn)了的方法,在webstorm中出現(xiàn)波浪線;表現(xiàn)為:
1、鼠標(biāo)懸停提示:Unresolved function or method XXX
2、Command+click試圖進(jìn)入該方法時(shí)提示:Cannot find decalration to go to
解決方案:
第一步、setting->Languages and Frameworks->Node.js and NPM->勾選Coding assistance for node.js

image.png
第二步、刪除與app目錄平級(jí)的,typings目錄即可。
ps:第一步常用來(lái)解決找不到node原生方法或者npm包提供的方法。