【发布时间】:2021-10-21 19:34:09
【问题描述】:
错误npm ERR! could not determine executable to run是什么意思?
我正在尝试使用 typescript 和 yarn 初始化一个简单的 nodejs 应用程序。我以前从未真正使用过纱线。
我已经运行了以下命令:
yarn init
成功创建了package.json
npx typescript --init
给我上面的错误信息。
版本: 纱线 v1.22.11 npx 7.12.0
我已经运行了yarn add typescript,它给了我:
info Direct dependencies
└─ typescript@4.3.5
info All dependencies
└─ typescript@4.3.5
但是当我尝试typescript -v 我得到typescript: command not found
【问题讨论】:
-
我不知道你想做什么,但是如果你想创建一个
tsconfig.json文件,那么我使用的命令是tsc --init。
标签: node.js typescript npm yarnpkg