任何人都可以告诉我如何将Express
作为javascript库添加到Web Storm 6.我已经通过Expresss
安装了npm
。然后在Web Storm首选项中,我添加了一个名为Express
的新库,并附加了node_modules/express
文件夹。
但是,Web Storm仍然抱怨它无法解决express.bodyParser()
等方法。
我也不知道为Documentation URL
库的Express
指定了什么。
有人可以帮忙吗?
答案 0 :(得分:-1)
我不知道添加Express库是什么意思。如果您打算链接全球快递安装,我不推荐它。我的建议是
使用命令行/终端
全局安装express npm install -g express
2然后使用命令行创建快速应用程序
express myapp
3安装依赖项
cd myapp && npm install
4使用File - >使用Webstorm打开myapp目录;打开目录
如果您已经在应用程序根目录中检查了package.json,那么它应该在其依赖项中包含express:
{
"name": "hello-world",
"description": "hello world test app",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x"
}
}
如果缺少快递,请将其添加到您的包json中,然后执行npm install