cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

Cannot install functions emulator

Open catsclaw opened this issue 7 years ago • 7 comments

Version info

$ firebase --version
4.1.1

Platform Information

OS X

Steps to reproduce

I've got Node 8 installed, and my functions use Node 8 features.

Expected behavior

It installs.

Actual behavior

$ yarn global add @google-cloud/functions-emulator
yarn global v1.9.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
warning Pattern ["@google-cloud/functions-emulator@^1.0.0-beta.5"] is trying to unpack in the same destination "/Users/chris/Library/Caches/Yarn/v2/npm-@google-cloud/functions-emulator-1.0.0-beta.5-08aa14a007b739aadcf7296e0b4354cd8a8d81df" as pattern ["@google-cloud/functions-emulator@^1.0.0-beta.4"]. This could result in non-deterministic behavior, skipping.
info @google-cloud/[email protected]: The engine "node" is incompatible with this module. Expected version "~6".
info "@google-cloud/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
error @google-cloud/[email protected]: The engine "node" is incompatible with this module. Expected version "~6".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

catsclaw avatar Aug 20 '18 21:08 catsclaw

+1

ztimson avatar Aug 29 '18 14:08 ztimson

I ran into a similar issue when using yarn, a temporary workaround is to include the --ignore-engines flag when adding the emulator (yarn global add @google-cloud/functions-emulator --ignore-engines).

mitchmalig avatar Aug 31 '18 12:08 mitchmalig

Same here for node v9.11.2 via nvm and firebase 4.1.0. This problem seems to prevent me from using firebase serve for functions or firebase functions:shell :(

morgler avatar Aug 31 '18 23:08 morgler

That's really strange that such an important part of Functions development is depending on such old version of Node :( Apparently, the emulator can run even under node 10.4.1 that I do have installed, so why not just remove the constraint from package.json? Using --ignore-engines did help indeed, but it's rather cumbersome to remember use it every time when installing some package.

danielkcz avatar Sep 09 '18 11:09 danielkcz

Any news on this? I'm using Node 8 and have to add --ignore-engines every time I do anything with yarn.

garyo avatar Apr 16 '19 12:04 garyo

Not to take away someone else's credit but... I believe this to be fixed as of 098e2531!

Until it have been released though, you can also do echo ignore-engines true >> .yarnrc if you've grown tired of --ignore-engines. ;)

op avatar May 07 '19 11:05 op

That doesn't fix the install constraint. Thanks for the .yarnrc trick though.

sweepies avatar May 08 '19 12:05 sweepies