title: How to move interchangeably between the VS2015 and Ionic CLI
body: <p>When <a href="http://blogs.msdn.com/b/visualstudio/archive/2015/05/01/tools-for-apache-cordova-in-visual-studio-2015-rc.aspx" rel="nofollow noreferrer">Tools for Apache Cordova in Visual Studio 2015 RC</a> was released, the claim was that there was compatibility with “Stock” Cordova Projects.</p>
  
  <p>I would like to be able to move interchangeably between the IDE and command line tools.</p>
  
  <p>I have Visual Studio 2015 with Visual Studio for Apache Cordova Tools (recently updated via Tools -> Updates and Extensions)</p>
  
  <p>I have recently re-installed Node.js, npm and Ionic as per <a href="http://ionicframework.com/getting-started/" rel="nofollow noreferrer">getting started with Ionic</a></p>
  
  <p>To get my project set up for both the IDE and the CLI, I did the following:</p>
  
  <ol>
  <li>In VS2015 right-clicked solution -> Add -> New project -> Javascript -> Ionic Tabs App</li>
  <li>Run using Ripple - success.</li>
  <li>In a command line <code>ionic start MyApp</code> to create an ionic project using the Ionic CLI</li>
  <li>Run MyApp using <code>ionic serve</code> - success</li>
  <li>Copied the contents of the MyApp folder into the folder created in step 1 keeping files with the same name (so that I can compare them later - they are only related to the app and the copied index.html is renamed so the ionic version will not run).</li>
  <li>Run in Ripple - success</li>
  <li>Open command window in folder created in step 1 - <code>ionic serve</code> - success</li>
  <li>I noticed that I was getting the following message in the Output Window when viewing Task Runner Explorer: <code>'gulp' is not recognized as an internal or external command,
  operable program or batch file</code> so I ran <code>npm install -g gulp</code> and that message no longer appears</li>
  </ol>
  
  <p>However, when I look at the project in VS2015, the Bower dependencies show a warning that they are not installed</p>
  
  <p><a href="https://i.stack.imgur.com/6AdYr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6AdYr.png" alt="ionic - not installed"></a></p>
  
  <p>Also I get errors in the output window from Bower/NPM:</p>
  
  <blockquote>
    <p>Error - Cannot load global packages. System.AggregateException: One or
    more errors occurred. --->
    Microsoft.NodejsTools.Npm.PackageJsonException: Error reading
    package.json at
    'C:\Users\Colin\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\node_modules\graceful-fs\package.json':
    Error reading package.json. The file may be parseable JSON but may
    contain objects with duplicate properties.</p>
  </blockquote>
  
  <p>I don't know if these might be related to my re-install of Node and npm rather than just trying to combine the two templates, but how do I go about fixing these issues?</p>
  
  <p><strong>EDIT</strong>
  Looks like the error in the <code>graceful-fs\package.json</code> is down to a <a href="https://github.com/npm/npm/issues/9965" rel="nofollow noreferrer">bug in npm</a></p>