1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Deno製のReact風フロントエンドフレームワークAleph.jsをインストールしたが,alephコマンドが実行できなかった

Last updated at Posted at 2021-12-17

概要

公式ドキュメント通りに,DenoでAleph.jsをインストールした.
しかし,alephコマンドが実行できず,command not foundと言われた.

$ deno run -A https://deno.land/x/aleph/install.ts
Check https://deno.land/x/aleph/install.ts
Looking up latest version...
Aleph.js was installed successfully
Run 'aleph -h' to get started

$ aleph -h
zsh: command not found: aleph

解決方法

原因としては,Denoでインストールしたバイナリファイルに対するpathが通っていないことだった.
Denoのバイナリファイルは~/.deno/binに入っているのでそこに対するパスを通してあげれば実行できるようになる.

自分の場合は以下のコードを.zshenvに追加してpathを通した.

.zshenv
# denoのパスを通す
export DENO_INSTALL=~/.deno
export PATH=$DENO_INSTALL/bin:$PATH

追加後,source .zshenvを実行することで,無事alephコマンドが実行できた.

$ source .zshenv

$ aleph -h
Aleph.js v0.3.0-beta.19
The Full-stack Framework in Deno.

Docs: https://alephjs.org/docs
Bugs: https://github.com/alephjs/aleph.js/issues

Usage:
    aleph <command> [...options]

Commands:
    init           Create a new app
    dev            Start the app in development mode
    start          Start the app in production mode
    build          Build the app to a static site (SSG)
    upgrade        Upgrade Aleph.js command

Options:
    -v, --version  Prints version number
    -h, --help     Prints help message

バージョン

deno 1.17.0
Aleph.js v0.3.0-beta.19

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?