Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

firebaseのインストールがうまくいかないです。

npm run buildとしたらerrが出たんですが、何がダメだったかわかりませんか?
ちなみに、設定は動画を見てやったんで間違いないと思います。

$ npm run build
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\DELL\Dropbox\My PC (DESKTOP-DOP2ONS)\Documents\todoapp\package.json       
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\DELL\Dropbox\My PC (DESKTOP-DOP2ONS)\Documents\todoapp\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\DELL\AppData\Roaming\npm-cache\_logs\2020-09-14T23_39_08_696Z-debug.log    
$ firebase deploy

=== Deploying to 'chatbot-demo-9fa3c'...

i  deploying firestore, functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint

> functions@ lint C:\Users\DELL\Dropbox\My PC (DESKTOP-DOP2ONS)\Documents\todoapp\functions      
> tslint --project tsconfig.json

Running command: npm --prefix "$RESOURCE_DIR" run build

> functions@ build C:\Users\DELL\Dropbox\My PC (DESKTOP-DOP2ONS)\Documents\todoapp\functions     
> tsc

+  functions: Finished running predeploy script.
i  firestore: reading indexes from firestore.indexes.json...
i  cloud.firestore: checking firestore.rules for compilation errors...
+  cloud.firestore: rules file firestore.rules compiled successfully
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
+  functions: required API cloudfunctions.googleapis.com is enabled
!  functions: missing required API cloudbuild.googleapis.com. Enabling now...

Error: HTTP Error: 400, Billing account for project '1045938759305' is not found. Billing must be enabled for activation of serv enabled for activation of service(s) 'cloudbuild.googleapis.com,containerregistry.googleapis.com' to proceed.
0 likes

1Answer

パッと思いつく範囲だと、firebaseのプラン指定とかですかね?(クラウドファンクション使ってるなら)
あと、package.jsonを「no such file or directory」言われてるので
コマンド打ってる場所が正しいか見た方が良いかもです。

1Like

Comments

  1. ありがとうございます、自分の作っているディレクトリってどうやって見れますか?
  2. たぶん「dir」とかで見れると思いますよ。

    ただ、多分ウィンドウズ?っぽいので、
    通常のエクスプレローラーで作業フォルダを見てファイルを探したうえで、
    フォルダパスをコマンドラインにコピペした方が簡単かもしれません。

Your answer might help someone💌