微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么纱线跳过我的路径?以及如何使用来自纱线脚本的命令

如何解决为什么纱线跳过我的路径?以及如何使用来自纱线脚本的命令

我正在尝试启动一个使用 yarn 构建的项目,但是在运行使用常用命令(例如 mkdir)的脚本时遇到了一些问题

手头的项目是 kdcio 的 abu-cms (https://github.com/kdcio/abu)

yarn setup:local 由于使用 mkdir 出错而失败(调用的脚本是资源文件夹中的 setup:local:ddb)

当我尝试执行单个步骤时的输出如下(从主工作区运行整个脚本相同):

mattia@mattia-ubnt:~/abu$ yarn workspace res setup:local:ddb
yarn workspace v1.22.10
yarn run v1.22.10
$ mkdir -p .dbdata && yarn start && yarn ddb:wait && yarn ddb:init
/bin/bash: line 1: mkdir: command not found
error Command Failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command Failed.
Exit code: 127
Command: /usr/bin/node
Arguments: /usr/local/lib/node_modules/yarn/lib/cli.js setup:local:ddb
Directory: /home/mattia/abu/resources
Output:

我手动创建了 .dbdata 文件夹并尝试执行 ddb:init 步骤(使用 aws cli,在我的系统中正确安装和配置)并失败并出现类似错误

mattia@mattia-ubnt:~/abu$ yarn workspace res ddb:init
yarn workspace v1.22.10
yarn run v1.22.10
$ aws dynamodb create-table --cli-input-json file://schema.json --endpoint-url http://localhost:8062 --region ap-southeast-1 --output text --query 'Table.TableName'
/bin/bash: line 1: aws: command not found
error Command Failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command Failed.
Exit code: 127
Command: /usr/bin/node
Arguments: /usr/local/lib/node_modules/yarn/lib/cli.js ddb:init
Directory: /home/mattia/abu/resources
Output:

你能帮我理解为什么这些命令在 yarn 的 PATH 中不可用吗?

如果您认为对我的环境进行更多配置可能有助于找到问题,请告诉我,我会尽我所能尽快提供。

谢谢!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。