gpt4 book ai didi

node.js - 无法 "npm install aws-lib"

转载 作者:太空宇宙 更新时间:2023-11-04 00:45:36 28 4
gpt4 key购买 nike

我对 AWS 非常陌生,我开始探索 AWS 文档,并考虑从 NodeJS 应用程序连接 AWS sdk,因为我已经安装了 npm aws-lib,如下所示。

您能帮我解决这个问题吗?

appss-MacBook-Pro-2:NodeJS apps$ npm install aws-lib

aws-lib@0.3.0 node_modules/aws-lib

├── underscore@1.5.2
├── xml2js@0.1.14
└── sax@0.1.5

appss-MacBook-Pro-2:NodeJS apps$ npm test

npm ERR! Darwin 15.0.0

npm ERR! argv "node" "/usr/local/bin/npm" "test"

npm ERR! node v0.12.7

npm ERR! npm v2.11.3

npm ERR! path /Users/apps/Desktop/IOT/NodeJS/package.json

npm ERR! code ENOENT

npm ERR! errno -2

npm ERR! enoent ENOENT, open '/Users/apps/Desktop/IOT/NodeJS/package.json'

npm ERR! enoent This is most likely not a problem with npm itself

npm ERR! enoent and is related to npm not being able to find a file.

npm ERR! enoent

npm ERR! Please include the following file with any support request:

npm ERR! /Users/apps/Desktop/IOT/NodeJS/npm-debug.log

appss-MacBook-Pro-2:NodeJS apps$

npm-debug.log的输出如下:

0 info it worked if it ends with ok

1 verbose cli [ 'node', '/usr/local/bin/npm', 'test' ]

2 info using npm@2.11.3

3 info using node@v0.12.7

4 verbose stack Error: ENOENT, open '/Users/apps/Desktop/IOT/NodeJS/package.json'

4 verbose stack at Error (native)

5 verbose cwd /Users/apps/Desktop/IOT/NodeJS

6 error Darwin 15.0.0

7 error argv "node" "/usr/local/bin/npm" "test"

8 error node v0.12.7

9 error npm v2.11.3

10 error path /Users/apps/Desktop/IOT/NodeJS/package.json

11 error code ENOENT

12 error errno -2

13 error enoent ENOENT, open '/Users/apps/Desktop/IOT/NodeJS/package.json'

13 error enoent This is most likely not a problem with npm itself

13 error enoent and is related to npm not being able to find a file.

14 verbose exit [ -2, true ]

最佳答案

您确实安装了aws-lib。您可以通过查看项目目录中的 node_modules 目录来验证它。

您接下来要做的是调用 npm test,但您的 package.json 文件中似乎没有 test 部分,因此 npm 不知道要为 test 运行什么。

关于node.js - 无法 "npm install aws-lib",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34893152/

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