gpt4 book ai didi

yarnpkg - yarn 全局安装 : "adonis: command not found"

转载 作者:行者123 更新时间:2023-12-04 10:57:01 33 4
gpt4 key购买 nike

yarn 安装了 Adonis在 Ubuntu 18 上(在 WSL2 VM 上运行):

pomatti@NT-03024:~/Projects/myApp$ yarn global add @adonisjs/cli
yarn global v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@adonisjs/cli@4.0.12" with binaries:
- adonis
Done in 3.29s.

但是,当我尝试运行它时,找不到该命令:
pomatti@NT-03024:~/Projects/myApp$ adonis
adonis: command not found

奇怪的是我的 package.json命令工作正常,我的应用程序已启动,但我无法调用 adonis直接在命令行中(全局安装)。

例如, yarn migration && adonis serve --dev --debug作品。
"scripts": {
"serve": "adonis serve",
"migration": "adonis migration:run",
"start": "yarn migration && yarn serve",
"dev": "yarn migration && adonis serve --dev --debug",
"lint": "yarn eslint"
},

最佳答案

尝试使用 NPM 安装。命令:

> npm i -g @adonisjs/cli

Official documentation

关于yarnpkg - yarn 全局安装 : "adonis: command not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59106052/

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