当我从其他计算机上的存储库克隆项目时,Ionic2出错 [英] Error in Ionic2 when I clone project from a repository on other computer
问题描述
我在ionic2做了一个项目。这是谷歌提供商的登录。我按照教程进行了操作。
I made a project in ionic2. It is a login with google provider. I followed this tutorial.
该应用程序在开发它的计算机上运行良好。我在另一台计算机上克隆了该项目,以便在团队中工作。我运行了这些命令。
The application works fine in the computer where it was developed. I cloned the project in another computer to work in team. And I ran these commands.
-
npm install
npm install
离子服务
离子平台添加android
ionic platform add android
离子运行android
ionic run android
基本上我没有修改项目中的任何内容。我只想运行它。该项目成功构建,但是当您尝试登录时,您在控制台中收到此错误:
Basically I didn't modify anything in the project. I just want to run it. The project builds successfully, but when you try to log-in you get this error in console:
04-05 15:39:18.971 17869-17869/com.company.ionic.carpool D/CordovaActivity: Resumed the activity.
04-05 15:39:18.987 17869-17869/com.company.ionic.carpool D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 79205 : EXCEPTION: Uncaught (in promise): 12501
04-05 15:39:18.987 17869-17869/com.company.ionic.carpool I/chromium: [INFO:CONSOLE(79205)] "EXCEPTION: Uncaught (in promise): 12501", source: file:///android_asset/www/build/main.js (79205)
04-05 15:39:18.987 17869-17869/com.company.ionic.carpool D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 79210 : ORIGINAL STACKTRACE:
04-05 15:39:18.987 17869-17869/com.company.ionic.carpool I/chromium: [INFO:CONSOLE(79210)] "ORIGINAL STACKTRACE:", source: file:///android_asset/www/build/main.js (79210)
04-05 15:39:18.992 17869-17869/com.company.ionic.carpool D/SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 79211 : Error: Uncaught (in promise): 12501
at new Error (native)
at Error.v (file:///android_asset/www/build/polyfills.js:3:4864)
at s (file:///android_asset/www/build/polyfills.js:3:4289)
at s (file:///android_asset/www/build/polyfills.js:3:4112)
at file:///android_asset/www/build/polyfills.js:3:4652
at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:10284)
at Object.inner.inner.fork.onInvokeTask (file:///android_asset/www/build/main.js:38157:37)
at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:10258)
at e.runTask (file:///android_asset/www/build/polyfills.js:3:7637)
at i (file:///android_asset/www/build/polyfills.js:3:3707)
我检查了项目中所有包和依赖项的完整性。我无法解决这个问题。有没有人知道为什么会发生这种情况?
I have checked the integrity of all packages and dependencies in the project. I am not able to fix this issue. Does anyone have any idea why is this happening?
推荐答案
您必须按照以下步骤操作才能更改开发环境。
You have to follow below steps hence you have changed the development environment.
第1步:删除平台
ionic platform rm android
第2步:添加平台
ionic platform add android
第3步:构建
ionic build android
第4步:运行
ionic run android --device
这篇关于当我从其他计算机上的存储库克隆项目时,Ionic2出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!