LoginSignup
7
3

More than 5 years have passed since last update.

firebase serve --only functions で Cannot find module 'firebase-admin' エラー

Posted at

試したこと

ここのやり取りに書いてあることを試しました。でもここの登場人物たちと同じようにエラーは解決しなかったです。

nvm use v6.11.5

エラーメッセージの内容は変わらず。ただCloud Functionsと同じバージョンをつかうように促すためのWarningが一つ消えただけ。

functions/ 内でnpm install

エラーメッセージの内容は変わらず。

functions/ 内でnpm run build

Error: Cannot find module '../lib/tsc.js'

どうすりゃええねん。

うまくいった解決策

functions/ 内でrm -rf node_modules/ → npm install

とりあえず動きました。

なんか、node_modulesの中身って時々壊れるみたいですね。

コンピューターがトラブったらとりあえず再起動するみたいな、そういう解決策。しばしば重要で忘れがちですね。

7
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
3