npm install对Kudu

时间:2017-11-21 03:50:03

标签: node.js azure npm kudu tedious

今天早上我运行了npm install,并创建了node_modules,其中包含了所有文件。

然后几个小时后,我运行相同的命令同一个package.json文件......没有错误,node_modules已创建,但是空了!?

任何想法?

这是我的package.json,非常规则通过添加tedious包的npm init生成。

{
  "name": "tedious",
  "version": "2.1.1",
  "description": "COnnect to Database",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/tediousjs/tedious.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/tediousjs/tedious/issues"
  },
  "homepage": "https://github.com/tediousjs/tedious#readme"
}

1 个答案:

答案 0 :(得分:2)

dependencies中没有package.json

您需要将要安装的npm模块添加到dependencies的{​​{1}}部分,然后运行package.json下载它们。

npm install

或者,您可以使用命令"dependencies": { "tedious": "^2.1.1", "express": "^4.14.0", ................... } 来执行此操作。

参考:Using a package.json