node.js - 其他 Amplify 和 AWS 文件中缺少模块 "aws-exports"

标签 node.js amazon-web-services npm aws-amplify

一家正在招聘的公司向我发送了一份“试用项目”。这是一个简单的项目,但使用 Amplify 和 AWS。 CTO 告诉我,我需要特定版本的 Node(10.18.1 或 10.19.0),并且我应该运行yarn install,一切都会顺利进行。所以我完全卸载了 Node,安装了 NVM 和我应该使用的 Node 版本。然后我打开项目并运行yarn install。

当我在浏览器中打开该项目时,我显然是一个模块 ./aws-exports,以及其他似乎与 Amplify 和 AWS 相关的文件。我注意到这些文件大部分都在 gitignore 中。但首席技术官再次告诉我,我不必进行任何设置。

我尝试使用 Npm 安装。使用不同版本的 Node 。各种愚蠢的小修复,我完全迷失了。

Compile Error

Compile Error

When using NPM rather than Yarn

Versions of Node the CTO told me to use

最佳答案

文件 ./aws-exports 将在 Amplify 初始化后创建 (https://aws-amplify.github.io/docs/cli-toolchain/quickstart?sdk=js#the-init-process)

它位于 .gitignore 中,因为它包含您在终端中配置的 AWS 账户的配置信息。

关于node.js - 其他 Amplify 和 AWS 文件中缺少模块 "aws-exports",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60460948/

相关文章:

node.js - 使用 IPC 作为中间人使用另一个包

mysql - 不同 VPC 上的 AWS RDS 只读副本

node.js - 预签名的 S3 URL 签名不匹配

asp.net-mvc - 如何使用 ASP.NET Core v2 在 Visual Studio 2017 中安装 font-awesome

node.js - npm 错误!解析 '..."jscs 附近时 JSON 输入意外结束“:"~3.0.7","moch'

npm - 更新到 npm 7.20.6 后,Vaadin 14 应用程序无法构建前端

node.js - Firebase 函数无法部署 : SyntaxError: Unexpected token function

node.js - 上传后处理临时文件

javascript - 使用await 在函数调用之外保留数据

javascript - 如何调试我的 dynamodb 插入不工作