当我发出npm install mongoose --save
我收到警告。我使用的是 El Capitan 10.11.1、Xcode 7.1.1 Build 版本 7B1005 和 npm 2.14.7。尽管一切正常(到目前为止),但我想进一步了解这一点。
Richards-MBP:app richardlu$ npm install mongoose --save
npm WARN peerDependencies The peer dependency kerberos@~0.0 included from mongodb-core will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
> [email protected] /cdn-cgi/l/email-protection install /Users/richard/okcoders/boom/app/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
CXX(target) Release/obj.target/kerberos/lib/worker.o
CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
../lib/kerberosgss.c:509:13: warning: implicit declaration of function 'gss_acquire_cred_impersonate_name' is invalid in C99
[-Wimplicit-function-declaration]
maj_stat = gss_acquire_cred_impersonate_name(&min_stat,
^
1 warning generated.
CC(target) Release/obj.target/kerberos/lib/base64.o
CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
SOLINK_MODULE(target) Release/kerberos.node
[email protected] /cdn-cgi/l/email-protection node_modules/mongoose
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
└── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)
为其他人提供一些背景。这个问题源于此:
无法安装 mongoose npm https://stackoverflow.com/questions/33140089/failing-to-install-mongoose-npm
^ 这个问题是一个error抛出是因为找不到 libgcc。
根据您的情况,有两个警告。第一个是这样的:
npm WARN peerDependencies The peer dependency kerberos@~0.0 included from mongodb-core will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
这些是 NPM 依赖项警告,指出(在本例中)mongodb-core
依赖于取决于kerberos
并且(可能是因为 kerberos 提供了 mongodb-core 运行并不完全必需的自定义功能),它不会作为 mongodb-core 的包含依赖项安装在npm
未来版本 3+(如果需要,您必须明确安装它)。
第二个警告是这样的:
warning: implicit declaration of function 'gss_acquire_cred_impersonate_name' is invalid in C99
这意味着,在 C99 标准中,不允许隐式函数声明(不提供标头签名 - 阅读有关标头和实现文件的信息)。然而,当kerberos
正在建设中,他们提供了-Wimplicit-function-declaration
C 编译器告诉它抛出警告而不是错误(所以他们期望这种情况发生)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)