前些天闲来无事,就写了一个vue+express+mysql的个人博客,但是api处理前台请求时,WebStorm就提醒出现Unresolved function or method get(); router.get()或者router.post()都没有

百度找了很久,在外国网站找到了解决方法:
1.File =>Settings =>Languages & Frameworks => Node.js and NPM
点击‘+’,依次安装’express’, ‘serve-static’和 ‘express-serve-static-core’,重启程序

2.如果这样不行,再加上这个方法:
file => settings => Languages&Frameworks => javascript =>Libraries =>download =>express =>download and install,重启程序

Logo

前往低代码交流专区

更多推荐