前提・実現したいこと
MonacaのクラウドIDEにてAngularのngコマンドを使い、新しいコンポーネントを追加したいのですが
「bash: ng: command not found」と返ってきます。
初歩的な質問で恐縮ですが、ご教授のほどよろしくお願い致します。
発生している問題・エラーメッセージ
bash: ng: command not found
試したこと
①Angularのngコマンドを使ってコンポーネントを追加したい。
②ngを実行すると「bash: ng: command not found」と返ってくる。
③そこでまず、「npm install -g @angular/cli」でCLIをインストールした後、「alias ng="/home/terminaluser/npm-global/lib/node_modules/@angular/cli/bin/ng"」を実行してみる。
④この状態でngコマンドを実行すると
You are running version v8.11.4 of Node.js, which is not supported by Angular CLI 8.0+.
The official Node.js version that is supported is 10.9 or greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
と出てくる。
⑤Node.jsをアップデートする必要があるようなので方法を調べてみるとsudoを使わなければならないらしい。
⑥sudoが存在しないようなのでインストールを試みる。
⑦そのためにはrootになる必要があるが、suでMonacaのパスワードを打ち込んでも認証されない。←今の状態
あなたの回答
tips
プレビュー