Ionic2应用程序从mac移动到pc导致构建问题

时间:2016-11-01 09:52:48

标签: node.js cordova angular npm ionic2

我将ionic2应用程序从mac移动到带有nodemodules的windows pc,并尝试使用npm run android运行,但收到​​如下所示的错误

enter image description here

这是我的离子信息:

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

我运行了以下命令:

npm uninstall ionic

npm cache clean

npm install -g ionic@latest

但我的cmd中无法识别ionic-app-scripts。我在这做错了什么?它在我的Mac上工作得很好但是转向电脑,我很沮丧。

任何建议都会有所帮助。谢谢。

这是my project repo,如果我从我的仓库中克隆了相同的应用程序,它正在构建正常但移动源代码不起作用。

更新#1

现在出现了不同的错误。

enter image description here

1 个答案:

答案 0 :(得分:2)

我添加此答案以防万一,因此具有相同问题的其他SO用户可以更轻松地找到答案。就像@nyluje在this post中推荐的那样,修复

  

无法读取属性' AssetUrl'未定义的

你应该带走" ^"签署"依赖"和" devDependencies"在package.json中,再次运行npm install