VSCode的使用

时间:2024-12-07 08:05:49

前后端分离的,先打开vs,打开你的项目,在项目根目录中找到.vs文件加,
找到.vs\config\applicationhost.config,然后打开找到你项目的IIS Express配置,例如:
<site name="TestPro.Web" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\project\TestPro" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:6234:localhost" />
<binding protocol="http" bindingInformation="*:6234:192.168.2.18" />
</bindings>
</site>
添加:<binding protocol="http" bindingInformation="*:6234:192.168.2.18" />注意ip是你的本机ip。
打开VSCode,打开网站文件夹,然后
1.先安装淘宝镜像:https://npm.taobao.org/
命令:npm install -g cnpm
2.安装模块,命令:cnpm install
3.运行起来,命令:gulp serve
4.然后报错了:Error: Cannot find module 'eslint-plugin-import',怎么办?