npm install在Kudu上什么都不做 [英] npm install just do nothing on Kudu

查看:102
本文介绍了npm install在Kudu上什么都不做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

This morning I run npm install and the node_modules was created with all the files in it.

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

Then a few hour after, I run the same command same package.json file... no error, node_modules was created, but empty!?

有什么想法吗?

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

Here my package.json, very regular generated via an npm init adding tedious package.

{
  "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"
}

推荐答案

您的package.json中没有dependencies.

您需要将要安装的npm模块添加到package.jsondependencies部分,然后运行npm install进行下载.

You'll need to add the npm modules you want to install into the dependencies section of your package.json, and then run npm install to download them.

"dependencies": {
    "tedious": "^2.1.1",
    "express": "^4.14.0",
    ...................
}

或者,您可以使用命令npm install <package_name> --save来做到这一点.

Alternatively, you can use the command npm install <package_name> --save to do that.

参考:使用package.json .

这篇关于npm install在Kudu上什么都不做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆