Run Ionic 4 project on another computer

Hello,

The disk on my computer failed and I had to get it replaced.

Fortunately I got all my data back. Unfortunately I did not back up my project on github. Now I am trying to run my project with my new disk, and is not working. In hindsight I see I should have been using github, but live and learn.

Can someone detail the process to get my project up and running again?

When I attempt to run I get the following error:

 ionic : The term 'ionic' is not recognized as the name of a cmdlet, function, script file, or operable program. 
 Check the spelling of the name, or if a 
 path was included, verify that the path is correct and try again.
 At line:1 char:1
 + ionic serve
 + ~~~~~
+ CategoryInfo          : ObjectNotFound: (ionic:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

I have tried uninstalling and installing ionic

Do the following to resolve, and you will be able to run ionic command any where
below are the steps are taken to resolve the issue.

  1. CMD run as Administrator and npm uninstall -g ionic cordova
  2. Shutdown the system, donā€™t restart
  3. Start/Boot system after sometime, removed all from TEMP folder.
  4. Installed the latest version of NodeJS as Administrator
  5. Open CMD as Administrator and updated npm install -g npm
  6. npm install -g ionic
  7. npm install -g cordova

what do you mean by ā€œremoved all from TEMP folderā€?

In the drive which you installed OS there in appdata/Local you can find temp folder just remove it

Thanks, That did not work with the same error persisting.

1 Like

HI, try using ionic command with administrator cmd.And if it did not resolve the issue then try reset your pc.

Did you add NodeJs and npm to your environment variables in windows?

Please stop recommending this.

There is never, ever, ever, any reason to run anything involving your Ionic development experience with elevated privileges. No sudo, no whatever ā€œadministrator cmdā€ means.

The only thing following this advice will do is make it even harder to know how to clean up the mess afterwards.

The problem arose because I had ionic files saved on my desktop, pre ionic install.

I uninstalled ionic, and node.js. moved all files to a external hard drive and shutdown my pc.

Rebooted my computer, re-installed node.js and ionic.