-
Notifications
You must be signed in to change notification settings - Fork 939
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
error with firebase deploy functions #356
Comments
What version of Node.js are you using?
…On Wed, May 31, 2017, 5:28 AM Laguses ***@***.***> wrote:
Hi,
I got this error when I try to deploy functions to my firebase project and
I can't solve this problem
firebase version:3.9.0
[debug] TypeError: Cannot read property 'pipesCount' of undefined
at module.exports.Readable.pipe (_stream_readable.js:545:16)
at module.exports.ZipArchiveOutputStream._smartStream
(/usr/local/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:171:11)
at module.exports.ZipArchiveOutputStream._appendStream
(/usr/local/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:94:20)
at module.exports.ArchiveOutputStream.entry
(/usr/local/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/archive-output-stream.js:89:10)
at module.exports.ZipStream.entry
(/usr/local/lib/node_modules/firebase-tools/node_modules/zip-stream/lib/zip-stream.js:105:49)
at module.exports.Zip.append
(/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/lib/plugins/zip.js:30:15)
at module.exports.Archiver._moduleAppend
(/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:123:16)
at module.exports.Archiver._onQueueTask
(/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:246:8)
at
/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/node_modules/async/lib/async.js:945:13
at Immediate.process [as _onImmediate]
(/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/node_modules/async/lib/async.js:913:25)
[error]
[error] Error: An unexpected error has occurred.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#356>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAAD_voVD-nm4r_ZHoU5cToJFNMXgNuGks5r_V0HgaJpZM4Nrkm->
.
|
latest version of Node.js ver:8.0.0 |
I've seen two more reports of this issue on NodeJS 8 in Slack. |
@laurenzlong let's make figuring this out a top priority. |
Seems to be a bug with one of our dependencies: archiverjs/node-archiver#236 |
+1 for hitting this error. also on node.js ver:8.0.0. |
1 similar comment
+1 for hitting this error. also on node.js ver:8.0.0. |
I downgraded node.js to ver:6.10.3 and now it works without any error. |
Got the same error when trying to deploy on Node version 8.0.0 and firebase deployment terminates with an unexpected error.: [debug] TypeError: Cannot read property 'pipesCount' of undefined |
I appreciate the apparent activity / response on this, I encountered this error. Just to remind people who's functions aren't critical i.e. for a mostly firebase hosted website - you can remove them temporarily - and I have been able to deploy doing this. |
I've also run into this error earlier and AFAIK the only workaround right now is downgrading Node.js from 8.0 to 7.10. From what I've gathered doing some debugging, the problem seems to arise in prepareFunctionsUpload.js when generating the zip file (here), so the culprit is either the archiver NPM package or one of its dependencies. Let me know if I can provide some more info.
|
We are waiting on the archiver package to make a fix (for now). They are
discussing it in the issue linked above by Lauren. The only way to fix for
the time being is to downgrade node.
…On Fri, Jun 2, 2017, 7:03 AM Josep Sayol ***@***.***> wrote:
I've also run into this error earlier and AFAIK the only workaround right
now is downgrading Node.js from 8.0 to 7.10.
From what I've gathered doing some debugging, the problem seems to arise
in *prepareFunctionsUpload.js* when generating the zip file (here
<https://github.com/firebase/firebase-tools/blob/59b61d13c8c4a8478aef168dff2691c58ab234da/lib/prepareFunctionsUpload.js#L80>),
so the culprit is either the *archiver* NPM package or one of its
dependencies.
Let me know if I can provide some more info.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#356 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAD_pQ5NOKxHepQcyQH5WxVNNlO-lnLks5sABY6gaJpZM4Nrkm->
.
|
@mbleigh We're not defining the node version in our functions project, and haven't seen the samples projects do it either. Is it as simple as defining node as a dependency in the package.json or is it the "engines" parameter in package.json? |
@ahaverty I feel I can answer that for you. Node is installed globally so it's not going to be in your package.json. You can use nvm (node version manager) to switch your node version. http://michael-kuehnel.de/node.js/2015/09/08/using-vm-to-switch-node-versions.html |
I see! So it's only a local issue during deployment? (It looks like firebase functions runs Node 6.9.1 regardless of the deployer https://cloud.google.com/functions/docs/writing/ ) |
Correct.
…On Fri, Jun 2, 2017, 8:27 AM Alan Haverty ***@***.***> wrote:
I see! So it's only a local issue during deployment? (It looks like
firebase functions runs Node 6.9.1 regardless of the deployer
https://cloud.google.com/functions/docs/writing/ )
Thanks @AlexChaseJones <https://github.com/alexchasejones>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#356 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAD_la24E0U4QFWi9hjNOWm7SigOtPMks5sACnmgaJpZM4Nrkm->
.
|
Confirmed, downgrading works. Instructions for n00bs like me who are doing the Firebase Codelab tutorials:
|
This is currently waiting for a node patch: nodejs/node#13374 |
Node v8.1.0 has just been released, and if you upgrade your node version, then deploy will work again. Unfortunately we cannot get firebase-tools to work with v8.0.0.
|
Helped just |
You can use babel and optionally webpack from transpile +ES8 to Node 6 which firebase currently uses. |
Hi,
I got this error when I try to deploy functions to my firebase project and I can't solve this problem
firebase version:3.9.0
[debug] TypeError: Cannot read property 'pipesCount' of undefined
at module.exports.Readable.pipe (_stream_readable.js:545:16)
at module.exports.ZipArchiveOutputStream._smartStream (/usr/local/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:171:11)
at module.exports.ZipArchiveOutputStream._appendStream (/usr/local/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:94:20)
at module.exports.ArchiveOutputStream.entry (/usr/local/lib/node_modules/firebase-tools/node_modules/compress-commons/lib/archivers/archive-output-stream.js:89:10)
at module.exports.ZipStream.entry (/usr/local/lib/node_modules/firebase-tools/node_modules/zip-stream/lib/zip-stream.js:105:49)
at module.exports.Zip.append (/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/lib/plugins/zip.js:30:15)
at module.exports.Archiver._moduleAppend (/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:123:16)
at module.exports.Archiver._onQueueTask (/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/lib/core.js:246:8)
at /usr/local/lib/node_modules/firebase-tools/node_modules/archiver/node_modules/async/lib/async.js:945:13
at Immediate.process [as _onImmediate] (/usr/local/lib/node_modules/firebase-tools/node_modules/archiver/node_modules/async/lib/async.js:913:25)
[error]
[error] Error: An unexpected error has occurred.
The text was updated successfully, but these errors were encountered: