0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

firebase functionsでlocal packageを使う

Posted at

firebase functionsで、local packageを使っているときに、deployしてもそのパッケージが無いよって言われちゃってどうしたもんだろう。と小1時間ググッた。
dependenciesに"mypackage": "../mypackage"とかしても見に行ってくれないのです。

現状、このWorkaroundが使える。
https://github.com/firebase/firebase-tools/issues/968#issuecomment-460323113

preinstallで該当packageをpackして、dependenciesにその生成物を指定する。

package.json
  "scripts": {
    "preinstall": "if [ -d ../mypackage ]; then npm pack ../mypackage; fi",
    ...
  },
  ...
  "dependencies": {
    "mypackage": "file:./mypackage-1.0.0.tgz",
    ...
  }

memo

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?