gpt4 book ai didi

node.js - npm install 在 Kudu 上什么都不做

转载 作者:行者123 更新时间:2023-12-03 05:51:32 26 4
gpt4 key购买 nike

今天早上,我运行 npm install 并使用其中的所有文件创建了 node_modules

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

有什么想法吗?

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

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

最佳答案

没有dependencies在你的package.json

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

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

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

引用:Using a package.json

关于node.js - npm install 在 Kudu 上什么都不做,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47404877/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com