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

NodeJS 6 support #960

Closed
jgw96 opened this issue Apr 27, 2016 · 44 comments
Closed

NodeJS 6 support #960

jgw96 opened this issue Apr 27, 2016 · 44 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented Apr 27, 2016

From @dealloc on April 27, 2016 12:30

Short description of the problem:

Ionic currently uses a deprecated version of graceful-fs which generates an enormous amount of stack traces when serving, or any other action for that matter

Steps to reproduce:

  1. install NodeJS 6
  2. run ionic serve

Which Ionic Version? 1.x or 2.x
Ionic 2.0.0-beta.25

Run ionic info from terminal/cmd prompt: (paste output below)

(node:13866) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================
<truncated huge stacktrace>


Your system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Distributor ID: Arch Description:   Arch Linux 
Node Version: v6.0.0

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

@jgw96
Copy link
Contributor Author

jgw96 commented Apr 27, 2016

Hey! Thanks for opening an issue with us! Since this issue is more related to the CLI than the framework I will be moving this issue over to that repo. Thanks!

@tlancina
Copy link
Contributor

Thanks for the issue, we'll need to take a look at our dependencies and make sure they are Node 6 compatible.

@lizhongit
Copy link

Same problem

@Erichain
Copy link

+1. I also have the same problem.

@bo01ean
Copy link

bo01ean commented Apr 28, 2016

+1

@nunoarruda
Copy link

nunoarruda commented Apr 28, 2016

This might be related to the fact that node-sass doesn't yet support Node 6 sass/node-sass#1484

Downgrade Node to v5.11.0 and you should be fine.

@soerjadi
Copy link

try check your graceful-fs version with npm -g list graceful-fs. The result will list package graceful-fs and all package that depends on graceful-fs.
example :

[surya@pc ~]$ npm list -g graceful-fs
/usr/lib
+-- graceful-fs@4.1.3 
+-- imagemin-gifsicle@4.2.0
| `-- gifsicle@3.0.3
|   `-- bin-build@2.2.0
|     `-- decompress@3.0.0
|       `-- vinyl-fs@2.2.1
|         `-- graceful-fs@4.1.2 
+-- less@2.1.2
| `-- graceful-fs@3.0.8 
`-- npm@3.8.7
  `-- graceful-fs@4.1.3 

found package that depends on old version of graceful-fs. Update it and start your apps again.

It works for me. hopefully it can help :)

@dealloc
Copy link

dealloc commented Apr 28, 2016

I have a couple packages indeed who depend on version 3 (one even depends on version 1.2.3) but I don't think I can update the dependencies of a specific package?

@soerjadi
Copy link

If you won't to update it, try search modules/package on folder node_modules in your apps that depends on graceful-fs. In my case it because modules less-middleware use version 1.0.x, when i see package.json on modules less-middleware is depends on package less@1.7.5 and less@1.7.5 depends on graceful-fs@3.0.8. So i update the less-middleware to the last version and it works. :)

@anasbousselham
Copy link

Same problem!!!

@jj-julia
Copy link

me to - same problem

@toxic2302
Copy link

Same problem!!!

@moosecodes
Copy link

Same problem here!

@minhdtb
Copy link

minhdtb commented Apr 30, 2016

I have the same problem

@iignatov
Copy link

I would suggest to everyone using Node v6 to downgrade to the latest Node v5 release. For more details read the following topic: DON’T rush to upgrade to Node v6. There are 89!!! breaking changes in Node v6 and I guess that it will take some time until all packages catch up.

@jgw96
Copy link
Contributor Author

jgw96 commented May 2, 2016

@iignatov I agree. Package maintainers have to have a chance to update their modules to work with node 6. Node 6 is great! But, it is just gonna take a little while for modules to support it. We are currently working on this, and hope to have the ionic cli working with Node 6 soon, but for now the best solution is too probably downgrade to the latest Node 5 release.

@dealloc
Copy link

dealloc commented May 2, 2016

As I see it the main failing package is graceful-fs and I have been getting deprecation messages for that package for ages now. Any package maintainer got more than the chance to upgrade their dependencies long ago when they started spamming everyone with deprecation messages when installing their packages

@bondden
Copy link

bondden commented May 3, 2016

Perhaps someone find it useful - not a solution, but a temporary walk-around for graceful-fs and alike modules: https://gist.github.com/bondden/2d2e07d18d94d1f4dc23b7dcf9b0e350

@eljefedelrodeodeljefe
Copy link

I don't know if it was mentioned, but I got pointed here. There is another issue with v6:

Run ionicwithout params likely has some fall-through to some loop over console logs. Those logs will be truncated. This is due to a libuv change in node core, that won't be fixed. There are a lot of similar tickets and I assume there will be fixes in yargs and similar.

Ref: yargs/yargs#497, nodejs/node#6456

Possible fix not using process.exit() and respective handlers. yargs/yargs#498

@jgw96
Copy link
Contributor Author

jgw96 commented May 11, 2016

Thanks @eljefedelrodeodeljefe !

@eljefedelrodeodeljefe
Copy link

@jgw96 (don't know if it's new) concerning graceful-fs it's one of your projects needs a bump for the major version of glob and vinyl-fs. BTW mocha`s HEAD has the same problem :)

├─┬ ionic-app-lib@0.7.0
│ ├─┬ ionic-cordova-lib@5.1.10
│ │ ├─┬ glob@4.0.6
│ │ │ └── graceful-fs@3.0.8 
│ │ └─┬ npm@2.15.5
│ │   └── graceful-fs@4.1.4 
│ ├─┬ node-sass@3.7.0
│ │ └─┬ node-gyp@3.3.1
│ │   └── graceful-fs@4.1.4 
│ ├─┬ unzip2@0.2.5
│ │ └─┬ fstream@0.1.31
│ │   └── graceful-fs@3.0.8 
│ └─┬ vinyl-fs@1.0.0
│   └── graceful-fs@3.0.8 
├─┬ npm@2.1.3
│ └── graceful-fs@3.0.2 
├─┬ unzip@0.1.9
│ └─┬ fstream@0.1.31
│   └── graceful-fs@3.0.8 
└─┬ vinyl-fs@0.3.7
  ├─┬ glob-watcher@0.0.6
  │ └─┬ gaze@0.5.2
  │   └─┬ globule@0.1.0
  │     └─┬ glob@3.1.21
  │       └── graceful-fs@1.2.3 
  └── graceful-fs@3.0.8 

@jgw96
Copy link
Contributor Author

jgw96 commented May 11, 2016

Hey, yeah we are already aware of the package version issues. We are currently being held back by the fact that some of our dependencies have yet to update to work with node 6. The cli team hopes to have full node 6 support within the next couple of beta cli releases (:

@kpx-dev
Copy link

kpx-dev commented May 24, 2016

I downgraded to node 5 and it works fine:
brew install node5

$ node --version
v5.11.1

@dealloc
Copy link

dealloc commented May 24, 2016

@kienpham2000 I'm aware it runs just fine under NodeJS5 but this issue is related to the support for version 6. Downgrading has already been suggested multiple times

@avatsaev
Copy link

vinyl-fs is using the old version of graceful-fs (graceful-fs@1.2.3), which itself depends on ionic@1.7.15

@dealloc
Copy link

dealloc commented May 26, 2016

Correct me if I'm wrong but their package.json doesn't seem to reference ionic

@roymj88
Copy link

roymj88 commented Jun 20, 2016

@nunoarruda, @iignatov Downgrading the node version to v5.11.1 resolved my problem. Thanks a lot for sharing the issue with latest node version 6.

@royipressburger
Copy link

Any news regarding this issue? when we will be able to use node v6?

@zengchuan
Copy link

Same problem!!!

@pbredenberg
Copy link

FWIW: samesies.

@ahmed-abdulmoniem
Copy link

I have been able to install ionic on node v6.3.0

image

@gurisko
Copy link

gurisko commented Jul 11, 2016

@ahmed-abdulmoniem And were you able to build a working ionic app?

@ahmed-abdulmoniem
Copy link

@gurisko Yeah I have built my application debug/release and the apk file has been generated.

@jthoms1
Copy link
Member

jthoms1 commented Jul 11, 2016

@gurisko Could you let me know if you are still experiencing issues. Could you also paste the results of running ionic info within your application directory? Thanks

@ahmed-abdulmoniem
Copy link

@gurisko @jthoms1 This is mine:

image

@gurisko
Copy link

gurisko commented Jul 13, 2016

Sorry for the late answer - it took me some time to debug the problem properly.
I found out that my problem was not the one reported. Thank you for your kind help, though!

@ChALkeR
Copy link

ChALkeR commented Jul 20, 2016

@dealloc

I have a couple packages indeed who depend on version 3 (one even depends on version 1.2.3)

@avatsaev

vinyl-fs is using the old version of graceful-fs (graceful-fs@1.2.3)

Note that 1.2.3 does not cause the runtime warning. Only graceful-fs@2 and graceful-fs@3 are affected.

Tracking: nodejs/node#5213.

ionic is currently #4 in my list of affected modules.

@ChALkeR
Copy link

ChALkeR commented Jul 20, 2016

Other things to note:

  • Node.js 5.x is not supported anymore, use either 4.x LTS or 6.x Current (soon to be LTS).
  • In Node.js 6.x, graceful-fs@2 and graceful-fs@3 support is not actually broken, this is just a warning. It would be turned into a throw in a future version of Node.js, probably in Node.js 7.0 (which will be released this autumn).

@ChALkeR
Copy link

ChALkeR commented Jul 20, 2016

Also: gulp@3, unzip, npm@2.1.3 and vinyl-fs@0.3.7 are currently in the dependencies.

There might be more, I just mentioned the ones that I spotted.

@justinschuldt
Copy link

Thought I had this issue but it turned out to be something else. I am able to to use the cli as expected with node 6.6.0

In case it helps someone else, here is what I'm running:

Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11-201609011853
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v6.6.0
Xcode version: Xcode 7.3.1 Build version 7D1014 

@jthoms1 jthoms1 closed this as completed Oct 28, 2016
@m1aw
Copy link

m1aw commented Nov 15, 2016

Problem is not yet fixed. graceful-fs is still getting installed with version 1.2.3 on node 6.9.3.

┬ ionic@2.1.8
│ ├─┬ gulp@3.8.8
│ │ └─┬ vinyl-fs@0.3.14
│ │   ├─┬ glob-watcher@0.0.6
│ │   │ └─┬ gaze@0.5.2
│ │   │   └─┬ globule@0.1.0
│ │   │     └─┬ glob@3.1.21
│ │   │       └── graceful-fs@1.2.3
│ │   └── graceful-fs@3.0.11

Yet NodeJS 6 is what is documented in: http://ionicframework.com/docs/v2/getting-started/installation/

@flute
Copy link

flute commented Nov 24, 2016

After update gitbook to latest version, it works well.
Use gitbook ls and trygitbook update to update gitbook:

node: 6.2.0
npm: 3.8.9
gitbook: 3.2.2

@vikash1993
Copy link

vikash1993 commented Dec 22, 2016

#ionic info then info shows but i am unable to make android app. plz help me ?
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 3.13
Node Version: v7.0.0
Xcode version: Not installed

@saymo23
Copy link

saymo23 commented Mar 1, 2017

In my case uninstall gulp in global and i can run ionic run android withour problem.

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