質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Q&A

解決済

1回答

3793閲覧

npm startができない!

morimorimorio

総合スコア13

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

0グッド

0クリップ

投稿2017/05/15 09:36

Angular2のチュートリアル中、突然npm startができなくなってしまいました。
コードが間違っているかと思ってexampleのコードと見比べるも異なる部分は見つからず、ならばと思いnpm startができた頃の状態にgit reset --hard HEADしてみましたが、それでも上手くいきません。エラーは

$ npm start > angular-quickstart@1.0.0 prestart /home/vagrant/angular2-tutorial > npm run build > angular-quickstart@1.0.0 build /home/vagrant/angular2-tutorial > tsc -p src/ src/app/hero-detail.component.ts(24,117): error TS2339: Property ‘hero’ does not exist on type ‘HeroDetailComponent’. npm ERR! Linux 2.6.32-642.4.2.el6.x86_64 npm ERR! argv “/home/vagrant/.nvm/versions/node/v6.10.3/bin/node” “/home/vagrant/.nvm/versions/node/v6.10.3/bin/npm” “run” “build” npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! angular-quickstart@1.0.0 build: `tsc -p src/` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular-quickstart@1.0.0 build script ‘tsc -p src/‘. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the angular-quickstart package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! tsc -p src/ npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular-quickstart npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls angular-quickstart npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/vagrant/angular2-tutorial/npm-debug.log npm ERR! Linux 2.6.32-642.4.2.el6.x86_64 npm ERR! argv “/home/vagrant/.nvm/versions/node/v6.10.3/bin/node” “/home/vagrant/.nvm/versions/node/v6.10.3/bin/npm” “start” npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! angular-quickstart@1.0.0 prestart: `npm run build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular-quickstart@1.0.0 prestart script ‘npm run build’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the angular-quickstart package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular-quickstart npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls angular-quickstart npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/vagrant/angular2-tutorial/npm-debug.log

と出ていて、
npmのバージョンは3.10.10、
nodeのバージョンは6.10.3、
vagrant centOSでやっています。

ご教授願います!!

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

src/app/hero-detail.component.ts(24,117): error TS2339: Property ‘hero’ does not exist on type ‘HeroDetailComponent’.の部分を元に直したらいけました

投稿2017/05/15 13:59

morimorimorio

総合スコア13

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問