Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 8.4.3 failed and corrupted existing version #2383

Closed
voiceactivity opened this issue Jun 21, 2020 · 20 comments
Closed

Update to 8.4.3 failed and corrupted existing version #2383

voiceactivity opened this issue Jun 21, 2020 · 20 comments

Comments

@voiceactivity
Copy link

**Platform:**OS X 10.9.5 (13F1911)

[REQUIRED] Test case:

Been prompted by the npm to update the firebase-tools: npm install -g firebase-tools

[REQUIRED] Steps to reproduce:

$sudo npm install -g firebase-tools

[REQUIRED] Expected behavior:

the firebase-tools should be updated to the newest v8.4.3

[REQUIRED] Actual behavior

npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js

[email protected] postinstall /usr/local/lib/node_modules/firebase-tools/node_modules/protobufjs
node scripts/postinstall
[email protected] postinstall /usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine
node ./compatibility/detect.js

fs.js:115
throw err;
^

Error: EACCES: permission denied, open '/usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/index.js'
at Object.openSync (fs.js:439:3)
at Object.writeFileSync (fs.js:1190:35)
at /usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/detect.js:35:15
at Object. (/usr/local/lib/node_modules/firebase-tools/node_modules/storage-engine/lib/compatibility/detect.js:45:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node ./compatibility/detect.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

After this error I've lost my previous firebase-tools setup completely:
$ firebase --version
bash: firebase: command not found

This is the log file:
...
14621 timing action:postinstall Completed in 610ms
14622 verbose unlock done using /Users/pavel/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
14623 timing stage:rollbackFailedOptional Completed in 2406ms
14624 timing stage:runTopLevelLifecycles Completed in 34054ms
14625 warn [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
14626 warn [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
14627 verbose stack Error: [email protected] postinstall: node ./compatibility/detect.js
14627 verbose stack Exit status 1
14627 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
14627 verbose stack at EventEmitter.emit (events.js:189:13)
14627 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
14627 verbose stack at ChildProcess.emit (events.js:189:13)
14627 verbose stack at maybeClose (internal/child_process.js:970:16)
14627 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14628 verbose pkgid [email protected]
14629 verbose cwd /Users/pavel/IdeaProjects/AWS_CodeCommit/google-assistant-tasks
14630 verbose Darwin 13.4.0
14631 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "i" "-g" "firebase-tools"
14632 verbose node v10.15.1
14633 verbose npm v6.14.5
14634 error code ELIFECYCLE
14635 error errno 1
14636 error [email protected] postinstall: node ./compatibility/detect.js
14636 error Exit status 1
14637 error Failed at the [email protected] postinstall script.
14637 error This is probably not a problem with npm. There is likely additional logging output above.
14638 verbose exit [ 1, true ]

@google-oss-bot
Copy link
Contributor

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@maikelsgit
Copy link

Same issue here!

@voiceactivity
Copy link
Author

voiceactivity commented Jun 21, 2020 via email

@ghost
Copy link

ghost commented Jun 21, 2020

Hi, I confirm this issue. firebase tool was removed after the latest update via npm.

@nuthinking
Copy link

nuthinking commented Jun 21, 2020

The issue is with a dependency, even downgrading to 8.0.2 now fails. Which dependency is it? Despite the error, it doesn't look like storage-engine was just updated. firebase-action looks like it solved it by specifying a new node version but that didn't work for me. Ideas?

@kleiteimc
Copy link

Ran into the same problem too. 🙁

@anthonycollinnadeau
Copy link

anthonycollinnadeau commented Jun 22, 2020

Same here... We install firebase-tools in our ci for deployment I tried to change node version 14.4 to 12.18 and change firebase-tools 8.4.3 to 8.4.2 and 8.3.0 they not seem to work either

@robyedlin
Copy link

👍 Same problem.

@vsaravind007
Copy link

Same issue on Node Version v12.14.1

@davidturtle
Copy link

Same.
8.4.2->8.4.3.

@Mistic92
Copy link

Same when running on CI where fresh build is done.

 $ npm install -g firebase-tools
 npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/firebase-tools/node_modules/chokidar/node_modules/fsevents):
 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
 npm ERR! code ENOENT
 npm ERR! syscall spawn git
 npm ERR! path git
 npm ERR! errno ENOENT
 npm ERR! enoent Error while executing:
 npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/DABH/diagnostics.git
 npm ERR! enoent 
 npm ERR! enoent 
 npm ERR! enoent spawn git ENOENT
 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!     /root/.npm/_logs/2020-06-22T12_04_00_184Z-debug.log

@samtstern
Copy link
Contributor

Thanks everyone for the reports. Looks like there's something seriously going wrong here although we don't quite know what yet. Will look into it today.

@samtstern
Copy link
Contributor

Clearly has something to do with this package:
https://www.npmjs.com/package/storage-engine

Last published 10 months ago so not a recent update issue. But there's a big uptick in downloads recently:
Screen Shot 2020-06-22 at 8 48 09 AM

The only package that depends on it is this one:
https://www.npmjs.com/package/diagnostics

Running npm ls storage-engine gives me no results but I'm going to try removing my package-lock.json and node_modules to see if that changes.

@samtstern
Copy link
Contributor

Ok we do have a dependency on diagnostics:

[email protected] /Users/samstern/Projects/firebase-tools
└─┬ [email protected]
  └── [email protected]

Which means we're getting the storage-engine dep from here:
https://github.com/3rd-Eden/diagnostics/blob/master/package.json#L60

Now I just need to determine what changed recently and what to do about it.

@samtstern
Copy link
Contributor

Ok here's the root cause;
winstonjs/winston#1814

Looks like a dependency of winston now requires git to be installed. The workaround is to make sure you have git on your machine although obviously we need to find a more permanent solution.

@samtstern
Copy link
Contributor

@nuthinking I am not sure what "using the CLI manually" means but yes anything to do with admin.firebase.com is not related to this issue.

@samtstern
Copy link
Contributor

Ok winston has released version 3.3.2 which I think should fix everything as long as you reinstall the Firebase CLI. Thanks everyone for your patience, that was a wild ride!

@voiceactivity
Copy link
Author

voiceactivity commented Jun 22, 2020

Fixed!
Thank you team for a very quick action!

@davidturtle
Copy link

Thx!

@moryapant
Copy link

how it is fixed? can someone please explain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests