nowを導入、Meteorアプリをデプロイできない(Windows環境)

スポンサーリンク

nowの導入し、デプロイを行ってみます。今回は、Meteor(ミーティア)をインストールし、新しく作成したアプリケーションをデプロイして公開してみます。

■PC環境

・Windows10、Administrator(管理者)アカウント

・node version 14.15.0

・npm version 6.14.8

・chocolatey 0.10.15

■nowを導入する

ウインドウを閉じた後に、新しいアプリケーションを作成するために、Windows10のデスクトップ画面の検索ボックスで「コマンドプロンプト」と入力します。

入力すると、「最も一致する検索結果」に「コマンドプロンプト」が表示されますので、こちらをクリックします。クリックすると、コマンドプロンプトが起動します。

npm install -g now meteor-now

起動後、上記のコマンドを入力し、Enterキーを押します。

npm WARN deprecated now@20.1.2: “now” is deprecated and will stop receiving updates on December 31, 2020. Please use “vercel” instead.

> now@20.1.2 preinstall C:\Users\Administrator\AppData\Roaming\npm\node_modules\now
> node ./scripts/preinstall.js

C:\Users\Administrator\AppData\Roaming\npm\meteor-now -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\meteor-now\build\main.js
C:\Users\Administrator\AppData\Roaming\npm\now -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\now\dist\index.js
+ now@20.1.2
+ meteor-now@0.8.0
added 130 packages from 45 contributors and updated 1 package in 19.515s

Enterキーを押すと、プリインストールが開始され、完了となります。

■nowにログインする

now login

完了後、上記のコマンドを入力し、Enterキーを押します。

Now CLI 20.1.2
Enter your email:

Enterキーを押すと、「Enter your email(メールアドレスを入力)」と表示されますので、メールアドレスを入力します。

Error! Please sign up: https://vercel.com/signup

入力すると「Error! Please sign up」と表示されましたので、登録していませんので、Webブラウザを起動し、表示された「https://vercel.com/signup」のURLをコピーし、アドレスバーに貼り付けします。貼り付け後アクセスします。

アクセスすると、「Join the best frontend teams」と表示されている下に「Continue with GitHub」ボタンがあるのでクリックします。今回はGitHubアカウントで登録します。

クリックすると、「Authorize Vercel(Vercelを承認する)」ページが表示されます。「Vercel by Vercel would like permission to:(Vercel by Vercelは、次の許可を求めています。)」と表示されていますので、承認するために「Authorize Vercel(Vercelを承認する)」ボタンをクリックします。クリックすると承認されますので、コマンドプロンプトに戻ります。

now login

戻った後に、再度上記のコマンドを入力し、Enterキーを押します。

We sent an email to (メールアドレス). Please follow the steps provided inside it and make sure the security code matches Proud Cougar.
/ Waiting for your confirmation

Enterキーを押すと、上記のメッセージが表示されます。「メールアドレスに、メールを送信しました。内部に記載されている手順に従って、セキュリティコードがProudCougarと一致することを確認してください。」という内容なので、メールアドレスを確認します。

確認すると、上記の内容のメールが届いていますので、「VERIFY」ボタンをクリックします。

√ Email confirmed
Congratulations! You are now logged in. In order to deploy something, run `now`.
💡 Connect your Git Repositories to deploy every branch push automatically (https://vercel.link/git).

クリックすると、上記のメッセージが表示されます。内容は、メールでの認証が確認されたので、ログインできましたというものです。

■デプロイする

meteor-now

ログインできましたので、上記のコマンドを入力し、Enterキーを押します。

Building meteor app (this can take several minutes)

Enterキーを押すと、上記のメッセージが表示されます。内容は、アプリの構築が行われています。(これには数分かかる場合があります)というものです。

‼ [METEOR-NOW] – WARNING: Did not pass a MONGO_URL. Bundling a NON-PRODUCTION version of MongoDB with your application. Read about the limitations here: https://git.io/vM72E
‼ [METEOR-NOW] – WARNING: It might take a few minutes for the app to connect to the bundled MongoDB instance after the deployment has completed.
√ [METEOR-NOW] – Preparing build
⠍⠁ [METEOR-NOW] – Deploying build (this can take several minutes) Now CLI 20.1.2
⠀⢐ [METEOR-NOW] – Deploying build (this can take several minutes)

メッセージが表示された後、ビルドのデプロイが行われましたが、これが待てど暮らせどいっこうに完了せず、デプロイすることができませんでした。

調べてみると、このような問題はWindows 10を使用している場合に発生するようです。再度同じ手順でデプロイを行いましたが、デプロイできませんでした。

MacOSで、デプロイを試みた方が良さそうです。

コメント

タイトルとURLをコピーしました