Node.jsの勉強を始めたHeroku初心者のNozです。
Node.jsのコマンドプロンプトでherokuの開発環境を整えようと、以下の内容を入力しました。
cd Desktop/node.js-sample
node.js-sample>git init
Reinitialized existing Git repository in C:/User/○○/Desktop/node.js-sample/.git/
node.js-sample>heroku create voicechannel
heroku-cli: Adding dependencies... 2.57 MB/2.57 MB
heroku-cli: Updating plugins... done.Updated 8 packages.
Creating voicechannel... done, stack is ceder-14
https://voicechannel.herokuapp.com/ | https://git.heroku.com/voicechannel.git
node.js-sample>git add .
node.js-sample>git commit -m"comment"
Oh branch master
nothing to commit, working directory clean
node.js-sample>git push heroku master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100%(3/3), done.
Writing objects: 100%(5/5), 623 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
そしたら添付画像のようなエラー文が出てきてしまいました…
herokuのページを見るとアプリはつくれたようなのですが、ブラウザでそのアプリを見ると、sample.jsに記入した"hello world"が表示されません…
デプロイという作業が上手く出来ていないようなのですが、どうしたらいいのかが分かりません。
どなたか教えていただけると幸いです…。
追記:
画像が添付できなかったため、長文ですが、手入力で失礼致します。
エラー文は
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version (latest stable) via sember.io...
remote: Downloading and installing node 5.10.0...
remote: Using default npm version: 3.8.3
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (new runtime signature)
remote:
remote:-----> Building dependencies
remote: Pruning any extraneous modules
remote: npm ERR! Linux 3.13.0-79-generic
remote: npm ERR! argv "/tmp/build_2d60f87c237a688f98b4965fd1219aec/.heroku/node/bin/node" "/tmp/build_2d60f87c237a688f98b4965fd1219aec/.npmrc"
remote: npm ERR! node v5.10.0
remote: npm ERR! npm v3.8.3
remote:
remote: npm ERR! Invalid version: "0.01"
remote: npm ERR!
remote: npm ERR! If you need help, you may report this error at:
remote: npm ERR! https://github.com/npm/npm/issues
remote:
remote: npm ERR! Pleaseinclude the following file with any support recest:
remote: npm ERR! /tmp/build_2d60f87c237a688f98b4965fd1219aec/npm-debug.log
remote:
remote:-----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote:
remote: htpps://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: Some possible problems:
remote:
remote: - Node version not specified in package.json
remote: https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote: Love,
remote: Heroku
remote:
remote:
remote: ! Push rejected, failed to compile Node.js app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to voicechannel .
remote:
To https://git.herou.com/voicechannel.git
![remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/voicechannel.git'
です。
また、
node.js-sample>var http = require('http');
と入力すると、
'var' は内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。
と返ってきます…
ご回答よろしくお願い致します。