使用Ionic与jasmine-karma,在运行测试时,获得成功编译,但在jasmine仪表板中获取空屏幕,并在控制台中出错.
以下教程:https://leifwells.github.io/2017/08/27/testing-in-ionic-configure-existing-projects-for-testing/
"ts-loader": "^4.1.0",
"jasmine-core": "^2.99.1"
Run Code Online (Sandbox Code Playgroud)
错误消息:
TypeError: env.stopOnSpecFailure is not a function at adapter.js:26
Error: Module build failed: TypeError: Cannot read property 'afterCompile' of undefined
Run Code Online (Sandbox Code Playgroud) 我正在laravel 5.2中处理cron作业,当我尝试从计划调用控制器功能时创建excel表获取错误.但在邮递员中运行良好.
ZipArchive::close(): Failure to create temporary: No such file or directory' in /var/www/html/Expenses/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php:398
zipArchive的临时文件权限问题?
我将phpexcel表保存到目录(777)时出现上述错误.
$excel_path = 'SubmittedSheets/'.$userId.'-'.uniqid().'.xlsx';
$objWriter->save($excel_path);
Run Code Online (Sandbox Code Playgroud) 收到此错误从到位桶推后的克隆,以前存在的项目运行良好,克隆从到位桶后没npm install和.babelrc文件存在于根目录下。
{
"presets": [
"babel-preset-react-native-stage-0/decorator-support"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}
Run Code Online (Sandbox Code Playgroud)
尝试的步骤:
npm install babel-preset-react-native-stage-0 --savenpm install --save-dev babel-preset-react-native@2.1.0但是在屏幕上出现相同的错误。
屏幕截图:
使用 Laravel 5.4 和 Mongodb 3.6 连接到数据库时收到错误消息
The "SCRAM-SHA-1" authentication mechanism requires libmongoc built with --enable-ssl
它在具有相同版本的 ubuntu 16.04 中运行良好,但在 AWS Linux 中则不然。
安装 LAMP [ php70, apach24 ] :
已安装 Mongodb [ 3.6 ] :
为 php7 安装了 php-mongodb 驱动程序:
sudo yum -y install php7-pear php70-devel gcc // completed
sudo pecl7 install mongodb // completed
sudo yum install openssl-devel // completed
Run Code Online (Sandbox Code Playgroud)
php-mongodb 驱动安装并更新到 php.ini,mongodb 也显示在 phpinfo() 中。
我们发现 phpinfo 禁用了 libmongoc ssl,这是问题吗?
我们如何启用它?
在 Windows 10 Home 上使用 Docker 工具箱,Docker 版本 19.03,我们创建了一个docker-compose.yml并添加了一个机密文件作为 JSON,它在 Mac 系统上运行良好,但无法在 Windows 10 Home 中运行。
运行后报错docker-compose up:
ERROR: for orthancserver Cannot create container for service orthanc: invalid mount config for type
"bind": invalid mount path: 'C:/Users/ABC/Desktop/Project/orthanc.json' mount path must be absolute
Run Code Online (Sandbox Code Playgroud)
docker-compose.yml:
version: "3.7"
services:
orthanc:
image: jodogne/orthanc-plugins:1.6.1
command: /run/secrets/
container_name: orthancserver
restart: always
ports:
- "4242:4242"
- "8042:8042"
networks:
- mynetwork
volumes:
- /tmp/orthanc-db/:/var/lib/orthanc/db/
secrets:
- orthanc.json
dcserver:
build: ./dc_node_server
depends_on:
- orthanc …Run Code Online (Sandbox Code Playgroud) docker docker-compose docker-toolbox docker-for-windows orthanc-server
使用Angular cli v5和angularfire2 v5,在控制台和终端上没有错误,它们都运行良好,但是在调用google登录功能时却在浏览器控制台上出错。
源代码 :
import { Component, OnInit, HostBinding } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase/app';
import { Router } from '@angular/router';
import { moveIn } from '../router.animations';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'],
providers: [AngularFireAuth],
animations: [moveIn()],
host: {'[@moveIn]': ''}
})
export class LoginComponent implements OnInit {
error: any;
constructor(public afAuth: AngularFireAuth) { }
loginGoogle() {
this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
}
logout() {
this.afAuth.auth.signOut();
}
ngOnInit() { }
}
Run Code Online (Sandbox Code Playgroud) google-oauth firebase-authentication angular-cli angularfire2 angular
我正在使用节点 v8.11,无法从 mongoDB 创建并返回新对象的对象中删除项目。
创建后的示例响应:
{
"name": "",
"device": "",
"session":"",
"_id": "5b7e78c3cc7bca3867bbd1c9",
"createdAt": "2018-08-23T09:05:07.134Z",
"updatedAt": "2018-08-23T09:05:07.134Z",
"__v": 0
}
Run Code Online (Sandbox Code Playgroud)
尝试从响应中删除“_id”,如下所示:
tokens.create(req.body).then(function(session){
delete session._id;
return res.send(session); // _id still exist
});
Run Code Online (Sandbox Code Playgroud)
我看到 ES6 中不推荐删除,这是这种情况的问题吗?如何使用 键删除一行中的项目?
使用symfony 3.4and PHP 7.1,在运行项目时它强制在https本地主机上运行,但不显示 https 内容。我怎样才能正常运行http。
也不运行https。安装本地后ca
symfony server:ca:install
Run Code Online (Sandbox Code Playgroud)
启用后不运行http。
symfony local:server:start --allow-http
Run Code Online (Sandbox Code Playgroud)
有一个锚标记,试图从javascript中点击它但没有响应,在加载页面时它应该next.php没有手动点击锚标记.我可以存档吗?
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="jquery-2.0.3.js"></script>
<script type="text/javascript">
alert("hai");
$(document).ready(function() { $('#about').click(); });
</script>
</head>
<body>
<div>
<a href="next.php" id="about">click here</a>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 我正在使用laravel 5.2,dompdf在本地主机上运行良好,但是当移至AWS时,它仍显示ErrorException in Cpdf.php line 3855: Undefined index:,在此行(3855)具有字体变量。
样例代码:
$html = "<h2>Hello</h2>";
PDF::setOptions(['dpi' => 150, 'defaultFont' => 'sans-serif']);
$pdf = PDF::loadHTML($html)->setPaper('a4', 'landscape');
return $pdf->download('pdfview.pdf');
Run Code Online (Sandbox Code Playgroud)
我无法设置'currentFont' => 'sans-serif'在setOptions因barryvdh / laravel-DOMPDF没有选项。所以我该如何解决currentFont问题。
Localhost-Windows-运行正常。
AWS-Linux-错误。
php ×3
javascript ×2
laravel-5 ×2
mongodb ×2
amazon-ec2 ×1
angular ×1
angular-cli ×1
angularfire2 ×1
babel ×1
docker ×1
dompdf ×1
express ×1
google-oauth ×1
html ×1
jasmine ×1
jquery ×1
linux ×1
localhost ×1
node.js ×1
npm ×1
phpexcel ×1
react-native ×1
reactjs ×1
symfony ×1