子包不包含在我的 npm 模块中
Subpackage is not included in my npm module
我有一个名为 'ldap-pool' 的 npm 模块。这个包依赖于 'ldapjs' 和 '@types/ldapjs',但是由于某些原因,当我将 'ldap-pool' 安装到另一个项目时,'@types/ldapjs' 包没有被安装.
以上就是问题所在
'ldap-pool' 的 package.json 文件是这样的:
{
"name": "ldap-pool",
"version": "0.0.1011",
"description": "LDAP client connection pool",
"main": "index.js",
"types": "index.d.ts",
"typings": "index.d.ts",
"scripts": {
"test": "./@test.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ORESoftware/ldap-pool.git"
},
"keywords": [
"ldap",
"pool",
"client",
"connection",
"ldapjs"
],
"author": "Olegzandr VD",
"license": "ISC",
"bugs": {
"url": "https://github.com/ORESoftware/ldap-pool/issues"
},
"homepage": "https://github.com/ORESoftware/ldap-pool#readme",
"dependencies": {
"chalk": "^1.1.3",
"ldapjs": "^1.0.1"
},
"devDependencies": {
"@types/chalk": "^0.4.31",
"@types/ldapjs": "^1.0.0",
"@types/node": "^7.0.31"
}
}
当我在另一个项目中安装 ldap-pool 时,我看到:
如果我将鼠标悬停在红色波浪线上,我会看到:
有谁知道为什么我 运行
时没有包含 ldapjs
类型
npm install
?
类型文件需要移动到 ldap-pool package.json 的依赖项部分。当模块用作依赖项时,不会下载模块的任何 devDependencies。
...
"dependencies": {
"chalk": "^1.1.3",
"ldapjs": "^1.0.1",
"@types/chalk": "^0.4.31",
"@types/ldapjs": "^1.0.0",
"@types/node": "^7.0.31"
}
...
我有一个名为 'ldap-pool' 的 npm 模块。这个包依赖于 'ldapjs' 和 '@types/ldapjs',但是由于某些原因,当我将 'ldap-pool' 安装到另一个项目时,'@types/ldapjs' 包没有被安装. 以上就是问题所在
'ldap-pool' 的 package.json 文件是这样的:
{
"name": "ldap-pool",
"version": "0.0.1011",
"description": "LDAP client connection pool",
"main": "index.js",
"types": "index.d.ts",
"typings": "index.d.ts",
"scripts": {
"test": "./@test.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ORESoftware/ldap-pool.git"
},
"keywords": [
"ldap",
"pool",
"client",
"connection",
"ldapjs"
],
"author": "Olegzandr VD",
"license": "ISC",
"bugs": {
"url": "https://github.com/ORESoftware/ldap-pool/issues"
},
"homepage": "https://github.com/ORESoftware/ldap-pool#readme",
"dependencies": {
"chalk": "^1.1.3",
"ldapjs": "^1.0.1"
},
"devDependencies": {
"@types/chalk": "^0.4.31",
"@types/ldapjs": "^1.0.0",
"@types/node": "^7.0.31"
}
}
当我在另一个项目中安装 ldap-pool 时,我看到:
如果我将鼠标悬停在红色波浪线上,我会看到:
有谁知道为什么我 运行
时没有包含ldapjs
类型
npm install
?
类型文件需要移动到 ldap-pool package.json 的依赖项部分。当模块用作依赖项时,不会下载模块的任何 devDependencies。
...
"dependencies": {
"chalk": "^1.1.3",
"ldapjs": "^1.0.1",
"@types/chalk": "^0.4.31",
"@types/ldapjs": "^1.0.0",
"@types/node": "^7.0.31"
}
...