Darth Ionic Darth Ionic - 1 year ago 92
Node.js Question

Ionic2 app moved from mac to pc causing build issues

I moved my ionic2 app from mac to windows pc with nodemodules and tried to run using

npm run android
, but getting an error as shown below

enter image description here

Here is my ionic info:

Your system information:

Cordova CLI: 6.4.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1-201610241941
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.31
OS: Windows 7 SP1
Node Version: v6.2.0

I ran following commands:

npm uninstall ionic

npm cache clean

npm install -g ionic@latest

but still
is not recognized in my cmd. What am I doing wrong here? It works great in my mac but moving to pc, I'm frustrated.

Any advice would be helpful. Thank you.

Here is my project repo, If I cloned the same app from my repo it's building fine but moving the source code not working.

Update #1

Now getting a different error.

enter image description here

Answer Source

I add this answer just in case so other SO users with the same issue could find the answer easier. Just like @nyluje recommends in this post, to fix

Cannot read property 'AssetUrl' of undefined

you should take away "^" sign in front of "dependencies" and "devDependencies" in package.json, and run npm install again.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download