git - 从 git 克隆后使 Ionic 2 项目工作

标签 git angular ionic2

我有一个可用的应用程序 (Ionic 2 Beta 7)。我推送到我的 Github,然后将 git 克隆到另一个文件夹中。

在新文件夹中,我为依赖项运行了 npm installionic state restore,并添加了 android 平台。

但是,ionic serve 仍然生成空白应用。

Chrome 开发工具中唯一的错误信息是

http://localhost:8100/build/js/app.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)

我已经阅读了不同的主题,但未能成功。 我试过 bower install 并以管理员身份运行 cmd,没有。

根据记录,所有内容都在 C:\驱动器上,其中也安装了 Node。

最佳答案

原来配置有问题。 解决步骤:

  1. 在项目根目录下找到文件package.json
  2. 编辑行 "ionic-gulp-browserify-typescript": "^1.1.0"“ionic-gulp-browserify-typescript”:“1.1.0” [删除插入符号 (^)]
  3. 运行 npm install

我的问题是我一开始只运行了 npm install,但你需要在 修复 package.json 中的依赖项问题后运行它。

链接到 Ionic 论坛修复帖子: https://forum.ionicframework.com/t/ionic-2-not-generating-app-bundle-js/55640/3

关于git - 从 git 克隆后使 Ionic 2 项目工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38043987/

相关文章:

git - 推送一个重新设置的分支?

git - pull/merge 分支的特定范围的提交

Git `format-patch` 什么也不返回

android - Git 停止在 Android studio 上工作

typescript - Ionic 2 - 如何根据先前的下拉选择显示第二个下拉数据

cordova - ionic 2 - 错误在 Android Studio 中找不到已安装的 Gradle 版本

具有延迟加载模块的 Angular 路由器面包屑

angular - 无法解析 TemlComponent : (? 的所有参数。在语法错误(compiler.js:1016)

Angular:如何将指令微语法与 cdkConnectedOverly 一起使用?

typescript - Ionic2:使用 navParam 在页面之间发送参数(单击返回导航按钮时)