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

TypeError: Cannot read property 'pipesCount' of undefined #2375

Closed
jgw96 opened this issue May 31, 2017 · 19 comments
Closed

TypeError: Cannot read property 'pipesCount' of undefined #2375

jgw96 opened this issue May 31, 2017 · 19 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented May 31, 2017

From @unipheas on May 31, 2017 7:37

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
I created a new app, installed my platforms, linked the app, ran resources, then tried to do 'ionic upload'. It's giving me an error of '_stream_readable.js:545 switch (state.pipesCount) { TypeError: Cannot read property 'pipesCount' of undefined ....

Expected behavior:
Successfully upload to Ionic Services

Steps to reproduce:

Related code:

_stream_readable.js:545
  switch (state.pipesCount) {
               ^

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/ionic/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:184:11)
    at module.exports.ZipArchiveOutputStream._appendStream (/usr/local/lib/node_modules/ionic/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:96:20)
    at module.exports.ArchiveOutputStream.entry (/usr/local/lib/node_modules/ionic/node_modules/compress-commons/lib/archivers/archive-output-stream.js:88:10)
    at module.exports.ZipStream.entry (/usr/local/lib/node_modules/ionic/node_modules/zip-stream/index.js:138:49)
    at Zip.append (/usr/local/lib/node_modules/ionic/node_modules/archiver/lib/plugins/zip.js:53:15)
    at Archiver._moduleAppend (/usr/local/lib/node_modules/ionic/node_modules/archiver/lib/core.js:172:16)
    at Archiver._onQueueTask (/usr/local/lib/node_modules/ionic/node_modules/archiver/lib/core.js:370:8)
    at /usr/local/lib/node_modules/ionic/node_modules/async/dist/async.js:4045:9
    at process (/usr/local/lib/node_modules/ionic/node_modules/async/dist/async.js:2316:17)

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.2.0
    Cordova CLI      : 7.0.1 
    Ionic CLI        : 3.2.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v8.0.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002 
    ios-deploy : 1.9.1 
    ios-sim    : 5.0.13 

Copied from original issue: ionic-team/ionic-framework#11872

@jgw96
Copy link
Contributor Author

jgw96 commented May 31, 2017

From @unipheas on May 31, 2017 8:22

**update: I ran 'ionic package build android' and got some new information

(node:18146) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
(node:18146) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@jgw96
Copy link
Contributor Author

jgw96 commented May 31, 2017

From @lathonez on May 31, 2017 12:4

I am getting the same error running ionic upload:

https://travis-ci.org/lathonez/clicker/builds/237887503?utm_source=email&utm_medium=notification

The entire build runs fine, just fails to upload.

dpl.1
Installing deploy dependencies
!!! Script support is experimental !!!
dpl.2
Preparing deploy
dpl.3
Deploying application
--email=[secure] --password=[secure]
[11:27:23]  build dev started ... 
[11:27:23]  clean started ... 
[11:27:23]  clean finished in 3 ms 
[11:27:23]  copy started ... 
[11:27:23]  transpile started ... 
[11:27:26]  transpile finished in 3.43 s 
[11:27:26]  preprocess started ... 
[11:27:26]  deeplinks started ... 
[11:27:26]  deeplinks finished in 31 ms 
[11:27:26]  preprocess finished in 33 ms 
[11:27:26]  webpack started ... 
[11:27:26]  copy finished in 3.65 s 
[11:27:35]  webpack finished in 9.13 s 
[11:27:35]  sass started ... 
[11:27:37]  sass finished in 1.35 s 
[11:27:37]  postprocess started ... 
[11:27:37]  postprocess finished in 5 ms 
[11:27:37]  lint started ... 
[11:27:37]  build dev finished in 14.03 s 
_stream_readable.js:545
  switch (state.pipesCount) {
               ^
TypeError: Cannot read property 'pipesCount' of undefined
    at module.exports.Readable.pipe (_stream_readable.js:545:16)
    at module.exports.ZipArchiveOutputStream._smartStream (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:184:11)
    at module.exports.ZipArchiveOutputStream._appendStream (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js:96:20)
    at module.exports.ArchiveOutputStream.entry (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/compress-commons/lib/archivers/archive-output-stream.js:88:10)
    at module.exports.ZipStream.entry (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/zip-stream/index.js:138:49)
    at Zip.append (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/archiver/lib/plugins/zip.js:53:15)
    at Archiver._moduleAppend (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/archiver/lib/core.js:172:16)
    at Archiver._onQueueTask (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/archiver/lib/core.js:370:8)
    at /home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/async/dist/async.js:4045:9
    at Object.process (/home/travis/.nvm/versions/node/v8.0.0/lib/node_modules/ionic/node_modules/async/dist/async.js:2316:17)
Script failed with status 1
failed to deploy

@milosh012
Copy link

Im getting the same error... does anyone know how to solve this? (node v8.0.0)

@imhoffd
Copy link
Contributor

imhoffd commented May 31, 2017

Thanks for making us aware. This looks like an issue with one of our dependencies: archiverjs/node-archiver#236

We recommend Node 6 LTS for the time-being, as recommended in the readme.

@milosh012
Copy link

But with node 6 I can not create a ionic project... it throws some other error...

@imhoffd
Copy link
Contributor

imhoffd commented May 31, 2017

@milosh012 Please make an issue detailing some other error and I'd be happy to help.

@lathonez
Copy link

lathonez commented May 31, 2017 via email

@lathonez
Copy link

Confirming that using LTS solved it for me.

@unipheas
Copy link

unipheas commented Jun 1, 2017

I too downgraded to LTS and it now works.

@cjnahine05
Copy link

downgrade node to v6.10.3 LTS

@jdhiro
Copy link

jdhiro commented Jun 6, 2017

Node 7.10 works fine for me, but I get this error with Node 8.

@klipnov
Copy link

klipnov commented Jun 7, 2017

I'm getting the same error with Node 8. I'll try the v6 LTS

Edit: After downgrade to v6.11.0, I can now upload.

@openroc
Copy link

openroc commented Jun 8, 2017

same problem,

global packages:

@ionic/cli-utils : 1.3.0
Ionic CLI        : 3.3.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-ionic-angular : 1.3.0
Ionic Framework                 : ionic-angular 3.3.0

System:

Node       : v8.0.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002
ios-deploy : 1.9.1
ios-sim    : 1.9.0

@unipheas
Copy link

unipheas commented Jun 8, 2017

They have a proposed pull for 8.1 here.

archiverjs/node-archiver#236

@Kin3Xc
Copy link

Kin3Xc commented Jul 4, 2017

Reinstall node 8 on my MacBook and it worked for me

@imhoffd
Copy link
Contributor

imhoffd commented Jul 10, 2017

Yep, node 8 has fixed it in 8.1.2+

@imhoffd imhoffd closed this as completed Jul 10, 2017
@manishnakar
Copy link

I upgraded my node to 8.2.1 and it worked for me.

Happy coding

@Niveshkrishna
Copy link

Yes, I upgraded to node v8.2.1 and it worked.

@vishnuvardhana
Copy link

I use nvm to to switch between node versions to solve this issue

nvm use v7' 'ionic upload

works great for me.

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

No branches or pull requests