[Fixed] "(node) sys is deprecated. Use util instead." error when tried to add a platform


#1

Hi community,
I try to add a platform without success. A new app using Ionic Creator.

Command and response:

$ ionic platform add android
Updated the hooks directory to have execute permissions
Running command: /Users/Pablo/Documents/Developer/workspace/safetyApp/hooks/before_platform_add/init_directories.js /Users/Pablo/Documents/Developer/workspace/safetyApp
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: com.ionicframework.starter
	Name: HelloCordova
	Activity: MainActivity
	Android target: android-23
Android project created with cordova-android@5.1.1
Running command: /Users/Pablo/Documents/Developer/workspace/safetyApp/hooks/after_prepare/010_add_platform_class.js /Users/Pablo/Documents/Developer/workspace/safetyApp
add to body class: platform-android
Running command: /Users/Pablo/Documents/Developer/workspace/safetyApp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/Pablo/Documents/Developer/workspace/safetyApp
Running command: /Users/Pablo/Documents/Developer/workspace/safetyApp/hooks/after_platform_add/010_install_plugins.js /Users/Pablo/Documents/Developer/workspace/safetyApp
(node) sys is deprecated. Use util instead.
Saving platform to package.json file

Information about my OS/setup/versions:

$ ionic info
Your system information:
Cordova CLI: 6.1.1
Gulp version:  CLI version 1.2.1
Gulp local:   Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.11.0
Xcode version: Xcode 7.3 Build version 7D175

and…

$ ionic platforms
Updated the hooks directory to have execute permissions
Installed platforms:

Available platforms:
  amazon-fireos ~3.6.3 (deprecated)
  android ~5.1.1
  blackberry10 ~3.8.0
  browser ~4.1.0
  firefoxos ~3.6.3
  ios ~4.1.0
  osx ~4.0.1
  webos ~3.7.0

Thanks,


#2

Any ideas? Still have the problem.
thx.


#3

It looks like the problems are in the hooks that you have.

Running command: /Users/Pablo/Documents/Developer/workspace/safetyApp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/Pablo/Documents/Developer/workspace/safetyApp
Running command: /Users/Pablo/Documents/Developer/workspace/safetyApp/hooks/after_platform_add/010_install_plugins.js /Users/Pablo/Documents/Developer/workspace/safetyApp

Try removing those hooks.


#4

Thx for response but that doesn’t work. Finally I downgrade my node from 5.x to 4.4.3 and all is working now, finally.

Btw, I try this solution after by mistake update my node with Homebrew (OS X) to 6.0 and this broke much more my ionic installation.


#5

Yeah, node 6 had a lot of breaking changes (hence the change in major version)