8

I am working on an Ionic 1 app with a remote team and lately our versions have not liked each other. I was wondering if the fact that I have also been working on Ionic 2 projects for whatever reason my CLI "thinks" these apps are also Ionic 2 and there for is shooting me the error below?

ionic build ios

WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:9061) 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.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'bower'

Do you need to run `npm install`?

I have ran npm install.. does not make it go away.. I also have make sure to have bower installed.

What does this hold up here have to do with? I've been stuck here for a couple days now.

Imgur

UPDATE

I went to an old project that and i tried to run ionic info to see the versions I have and system info but I get THE SAME error message..

I have no idea what I've done to get this...

mymac ~/code/92_AAC/newApp on master[!]
$ ionic info
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp'

Do you need to run `npm install`?

UPDATE 2

I downgraded from Node 6 to Node 5.9 On the current project I was having the original issues.. I got this..

$ ionic build ios
******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     

 Install ios-sim to deploy iOS applications. `npm install -g ios-sim` (may require sudo)
 Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)

******************************************************
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
(node:11866) 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.
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'bower'

Do you need to run `npm install`?

my ionic info(finally able to print it out)

Your system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 1.2.1
Gulp local:  
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.3 
OS: Mac OS X El Capitan
Node Version: v5.9.1
Xcode version: Xcode 7.3.1 Build version 7D1014 

UPDATE 3 after @janos suggestion

I ran npm install bower and it ran and installed some modules BUT I got the following..

  1. click this link to see a screen shot of my command line in more detail Screen Shot here!

```

$ ionic build ios WARN: ionic.project has been renamed to ionic.config.json, please rename it. (node:12122) 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. There is an error in your gulpfile: Error: ENOENT: no such file or directory, scandir '/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/vendor' at Error (native) at Object.fs.readdirSync (fs.js:945:18) at Object.getInstalledBinaries (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/extensions.js:74:13) at foundBinariesList (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:20:15) at foundBinaries (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:15:5) at Object.module.exports.missingBinary (/Users/abelista/code/inov/cornerstone/inov/a4c/passengerApp/trunk/passenger/node_modules/gulp-sass/node_modules/node-sass/lib/errors.js:45:5) at Object. (/Users/abelista/code/inov/cornerstone/inoabelista

```

  1. List item: The main error (A4CPassenger@1.1.1 - not sure what to call this.. but this was basically the name of the app? I believe the remote team changed it.. for whatever reason I am still getting the old name..)
alroc
  • 27,574
  • 6
  • 51
  • 97
Shotbyabel
  • 273
  • 1
  • 6
  • 18
  • Try to run `npm install bower`, and then `ionic build ios` again – janos May 06 '16 at 19:37
  • @janos Hello again! :D I did that.. Checkout my update 3.. it "worked" but I think I have an issue with a file.. – Shotbyabel May 06 '16 at 20:05
  • At one of the steps, you downgraded Node. I would start over clean, and not downgrade Node. Also keep in mind that when you get messages like `Cannot find module 'blah' Do you need to run "npm install"?` it really wants you to do `npm install blah` – janos May 06 '16 at 20:16
  • @janos you don't think its an issue with not having ALL of the code from the master branch? – Shotbyabel May 06 '16 at 20:50
  • You don't actually have all the code from the master branch? That's new information. In that case, all bets are off. – janos May 06 '16 at 20:52
  • @janos haha. I am beginning to suspect that. I have been under the impression that I have all the code.. because I have always had the code. I've been working on this project since February and yeah.. No idea whats different. – Shotbyabel May 06 '16 at 20:59
  • Have you tried what I suggested? Starting over with a clean checkout, with the latest version of Node.js and doing `npm install x` for all missing `x` that it complains about? – janos May 07 '16 at 06:03

4 Answers4

0

I was running Node 6.0.0 and I needed to run Node 4.4.4

Shotbyabel
  • 273
  • 1
  • 6
  • 18
  • https://github.com/creationix/nvm is a great little utility to bounce between node versionsthis. I have versions of node from 4.0 to 6.1 specifically for this, and this nvm takes away the pain of node updates. – user542319 Jan 28 '17 at 17:00
0

Under the above conditions can not be resolved, consider the ionic version, I encountered the same problem, because the final version ionic problem. ionic version upgrade quickly, do the project two months ago, and now ionic been upgraded from 1.7.16 to 2.0.0 of. if you Want to re-run this version, you should enter cmd 'npm install ionic@1.7.16', after the run is completed, then the implementation of 'ionic serve' you can run an older version of the project. I hope to help you

0

I got the same situation.

I had updated ionic from npm (because it said it is outdated) and I didn't realize I have to update npm too. So I have to update npm e remove and reinstall ionic.

# Update npm (downloaded from nodejs.org +6)

sudo npm remove ionic
sudo npm install -g ionic
Ratata Tata
  • 2,781
  • 1
  • 34
  • 49
0

Run npm uninstall --save-dev gulp-sass@2

gtzinos
  • 1,205
  • 15
  • 27