简体   繁体   中英

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

在此处输入图片说明

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 ionic-app-scripts 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.

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM