npm install just do nothing on Kudu

孤街醉人 提交于 2019-12-11 14:14:44

问题


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

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

ANy ideas?

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

回答1:


There is no dependencies in your package.json.

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",
    ...................
}

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

Reference: Using a package.json.



来源:https://stackoverflow.com/questions/47404877/npm-install-just-do-nothing-on-kudu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!