Tag: ionic framework

在cmd中安装离子时出错

使用cmd尝试安装离子时,我总是收到错误 在此之前我已经安装了Node JS $ npm install -g cordova ionic npm ERR! code SELF_SIGNED_CERT_IN_CHAIN npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN npm ERR! request to https://registry.npmjs.org/cordova failed, reason: self signed certificate in certificate chain npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\samar_000\AppData\Roaming\npm-cache\_logs\2017-07- 23T10_58_18_779Z-debug.log

离子启动错误证书链中的自签名证书

有人可以帮我解决这个问题。 当我运行CMD中的这个命令(作为pipe理员) ionic start projectName blank 我遇到这个问题 C:\ionic start firstApp blank √ Creating directory .\firstApp – done! [INFO] Fetching app base (https://github.com/ionic-team/ionic2-app- base/archive/master.tar.gz) × Downloading – failed! Error: self signed certificate in certificate chain 我的离子信息: cli软件包: @ ionic / cli-utils:1.6.0 离子(离子CLI):3.6.0 系统: 节点:v8.2.1 操作系统:Windows 10 npm:5.3.0 其他信息: 这是我第一次使用离子

节点Express会话和离子angular度之间的会话丢失

我在节点上使用快速会话来存储用户的数据。 我允许访问控制允许来源和访问控制允许证书。 所以在我的请求中,我设置了Credentials等于true: return this.http.post('https://localhost:2800/login', profile, {withCredentials: true}) 问题是,如果应用程序向其他站点发出任何请求,或者在S3上请求映像,则与服务器的会话将丢失。 (我必须再次login)。 这只发生在我的networking浏览器(运行离子服务),一旦我加载我的应用程序在物理智能手机运作良好。

没有改变,突然收到Ionic TypeError co.event是未定义的

我没有太多的信息,因为这是我曾经遇到的最奇怪的问题。 我正在写Ionic 2的应用程序。昨天晚上我睡觉了,一切都很好。 我今天早上起床继续工作,即使欢迎页面加载,当您滚动到主页时,我得到一个错误,co.event是未定义的。 这是一个壮观的无用的错误消息的截图(为什么我不能从Ionic的这个错误屏幕上复制粘贴错误消息?这么愚蠢)。 在我的代码库中search“co.event”会返回0个结果。 我没有改变任何地方的一行代码。 我什至不明白这是如何可能的,更不用说做什么来解决它。 我从我正在工作的分支转到Master分支,看看是否还好。 不,这个错误有一个完全不同的错误,尽pipe也没有改变。 我可以通过进入src/app/app.component.ts并注释掉this.initializeApp();来解决master分支上的错误this.initializeApp(); 这使一切工作,但似乎是一个非常糟糕的主意,因为这听起来像是一个非常关键的行列。 constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) { // this.initializeApp(); // used for an example of ngFor and navigation this.pages = [ { title: 'Welcome', component: WelcomePage }, { title: 'Home', component: HomePage }, { title: 'List', component: ListPage } ]; […]

nodejs mongoDB findOneAndUpdate(); 即使在数据库更新后也会返回true

我正在研究Ionic-1 + nodejs +angular度应用程序。 即使第一次调用更新数据库,我的mongoDb findOneAndUpdate()函数在每次调用时都会返回true。 的NodeJS: app.post('/booking', function (req, res) { var collection = req.db.get('restaurant'); var id = req.body.id; var status = req.body.status; collection.findOneAndUpdate({status: status, id: id},{$set:{status:"booked"}}, function (e, doc) { console.log(id, status); if (e) { console.log(e); } else if(!doc) { res.send(false); } else { res.send(true); } }); }); controller.js $scope.bookMe = function(id){ var […]

节点api在几分钟后失败

我已经用express中间件安装了nodejs应用程序。 贝娄是我的代码: var express = require("express"); var app = express(); var bodyParser = require("body-parser"); var router = express.Router(); var cors = require('cors'); var fs = require('fs'); var https = require('https'); app.use(cors()); app.use(bodyParser.json({limit: '50mb'})); app.use(bodyParser.urlencoded({ limit: '50mb', "extended": false })); app.use(express.static(path.join(__dirname, './demo'))); router.get("/", function (req, res) { res.json({ "error": false, "message": "Hello World" }); }); app.use('/api', […]

坚持cordova平台文件夹更快的CI构build

Ionic / Cordova项目的最佳做法是不要将platforms/ plugins/文件夹检入到SCM中,而Cordova将负责在第一个版本中引导所有必需的依赖关系。 虽然这对开发人员来说工作正常,但却显着降低了CI服务器的构build速度。 例如,我们运行一个MacMini作为构build奴隶, cordova prepare需要花费大约10分钟的时间完成(对于两个平台),总共需要12分钟的时间(其他大部分时间花费在npm install )。 现在,我已经试图简单地caching构build作业之间的platforms/ plugins/文件夹。 但是,由于我需要dynamic更新bundleId /包名称和应用程序名称以区分不同环境的构build,因此会导致Cordova无法dynamic更新此数据的错误。 我想知道是否有人遇到过类似的问题,并会对你解决问题的方式感兴趣。

我得到msg.trim不是一个function,当试图启动与离子的新应用程序

这里是错误: TypeError:msg.trim不是Logger.log中的函数(/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/utils/logger.js:78:21)在Logger.error (/usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/lib/utils/logger.js:35:14)。 (/usr/local/lib/node_modules/ionic/dist/index.js:186:22)在Generator.throw()被拒绝(/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js: 101:69)at 这是我正在运行的命令: $ ionic启动myApp 我的node.js版本是v8.9.1 ,npm是5.5.1 这是我在logger.js文件中find的 log(level, msg) { if (this.shouldLog(level)) { let prefix = this.prefix; if (typeof msg === 'function') { msg = msg(); } if (prefix) { if (typeof prefix === 'function') { prefix = prefix(); } msg = util.format(prefix, msg); } const color = this.getStatusColor(level); const status […]

离子错误:找不到模块'dezalgo'

我正在尝试添加ios平台到我的项目,所以我可以在XCode中build立它。 我跑了下面的命令:ionic cordova platform add ios 这是我得到的错误: ionic cordova platform add ios > cordova platform add ios –save module.js:544 throw err; ^ Error: Cannot find module 'dezalgo' at Function.Module._resolveFilename (module.js:542:15) at Function.Module._load (module.js:472:25) at Module.require (module.js:585:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/chando/Documents/GIT/testproject/node_modules/cordova-lib/node_modules/npm/lib/utils/correct-mkdir.js:2:15) at Module._compile (module.js:641:30) at Object.Module._extensions..js (module.js:652:10) at Module.load (module.js:560:32) at tryModuleLoad (module.js:503:12) at […]

npm更新错误,同时试图安装离子

我试图安装NPM时遇到问题。 总是运行良好,但现在,我要安装“离子”,问题是,当我试图重新安装nodejs一切正常,似乎npm安装,但试图更新它,它给了我错误,所以我试图通过这个命令来更新它: curl https://www.npmjs.org/install.sh | sh 我不能安装离子,我不知道为什么。 我已经安装了几个月前cordova和phonegap,但离子给我麻烦。 阅读指南,告诉我更新我的NPM,这样做,我已经(这是使用上面的命令以下错误) cleanup prefix=/usr/local All clean! unbuild npm@1.4.14 npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/npm' npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/usr/local/lib/node_modules/npm' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! […]