0
1

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 5 years have passed since last update.

GitHubからクローンしたAngularドキュメントサイトをローカルで動かそうとした時にエラーが出た話

Posted at

先日、AngularドキュメントサイトのソースをGitHubからクローンしてDockerで動かしてみる。という記事を投稿しましたが、実験中に出くわしたエラーメッセージがありました。

Dockerを使わずにローカルで動作させる場合にも関係する現象です。

AngularドキュメントサイトのREADME.mdに従って下記のコマンドを実行すると、下記のようなメッセージが表示されて処理が中断されました。

bash-4.2# yarn start
yarn start v0.23.4
$ yarn check-env && ng serve 
yarn check-env v0.23.4
$ node ../tools/check-environment.js 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!  Your environment is not in a good shape. Following issues were found:
!!!   - Looks like you are missing some npm dependencies. Run: npm install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Your environment doesn't provide the prerequisite dependencies.
Please fix the issues listed above and then rerun the gulp command.
Check out https://github.com/angular/angular/blob/master/DEVELOPER.md for more info.
error Command failed with exit code 1.
error Command failed with exit code 1.
bash-4.2# 

原因は、aioフォルダの上の階層のフォルダにもpackage.jsonがあり、事前にこちらに対してもnpm installを実行しておく必要がある、ということでした。

ローカルでドキュメントサイトを動作させる場合には、以下のような流れとなります。

git clone https://github.com/angular/angular.git

cd angular
npm install

cd aio
yarn
yarn docs
yarn start
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?