我正在尝试创建一个版本并得到以下错误
11愚蠢的生命周期Corporate-solutions@0.0.0~start:返回:代码:139信号:空
11愚蠢的生命周期Corporate-solutions@0.0.0~start:返回:代码:139信号:空
12个信息生命周期Corporate-solutions@0.0.0~start:无法执行启动脚本
13详细堆栈退出状态139
EventEmitter的13个详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
产生时13的详细堆栈(events.js:126:13)
EventEmitter.emit上的13个详细堆栈(events.js:214:7)
ChildProcess上的13个详细堆栈。(/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
产生时13的详细堆栈(events.js:126:13)
ChildProcess.emit的13个详细堆栈(events.js:214:7)
13个详细堆栈可能在mayClose(internal / child_process.js:925:16)
Process.ChildProcess._handle.onexit上的13个详细堆栈(internal / child_process.js:209:5)
在启动服务器时有时也会出现相同的错误
以下是我的package.json
{
"name": "corporate-solutions",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --ec true --port 4203 --host 0.0.0.0",
"build": "node --max_old_space_size=5300 ./node_modules/.bin/ng build --prod",
"win-build": "node --max_old_space_size=5300 ./node_modules/@angular/cli/bin/ng build --prod",
"build-notify": "node --max_old_space_size=5300 ./node_modules/.bin/ng build --prod && echo 'message: Build Completed' | zenity --notification --listen",
"build-push": "node --max_old_space_size=5300 ./node_modules/.bin/ng build --prod && ./distupload.sh",
"gitbuild": "ng build …Run Code Online (Sandbox Code Playgroud) 如何在Bookshelf JS中使用groupBy ,这是我的Controller代码.
router.route('/fetchStudentAttendance')
.post(function(req, res) {
StudentAttendance
.query(function (qb){
qb.where('date', '>=', req.body.date);
qb.groupBy("students_id");
})
.where({'class_id': req.body.class_id, 'section_id': req.body.section_id})
.fetchAll({ withRelated: [{'StudentRef':function(qb) {qb.column('id', 'first_name', 'middle_name', 'last_name')}}]})
.then(studentAttendance => {
let content = {
data: studentAttendance,
success: true,
message: 'Record Not Found',
};
return res.send(content);
})
.catch(error => {
let content = {
data: error,
success: false,
message: 'Error while fetching Student Attendance.',
};
return res.send(content);
});
Run Code Online (Sandbox Code Playgroud)
});
当我尝试"groupBy"employee_id时,它会像这样给出错误.
code:"42703"
file:"parse_relation.c"
length:110
line:"3194"
name:"error"
position:"127"
routine:"check_ungrouped_columns_walker"
severity:"ERROR"
Run Code Online (Sandbox Code Playgroud) 下面是我的HTML代码
<ck-editor
name="html_template"
[(ngModel)]="mailModel.html_template"
[config]="ckEditorConfig">
</ck-editor>
Run Code Online (Sandbox Code Playgroud)这是我的组件代码
this.ckEditorConfig = {
filebrowserUploadUrl: 'http://192.168.0.107:8000/api/crm/v1.0/crm-distribution-library-files',
fileTools_requestHeaders: {
'X-Requested-With': 'xhr',
Authorization: 'Bearer ' + localStorage.getItem('access_token')
},
filebrowserUploadMethod: 'xhr',
on: {
instanceReady: function( evt ) {
var editor = evt.editor;
console.log('editor ===>', editor);
},
fileUploadRequest: function(evt) {
console.log( 'evt ===>', evt );
},
},
};
Run Code Online (Sandbox Code Playgroud)有了这个,我无法获取文件,也无法发送自定义标题
你能帮我解决这个问题吗?
我有一个demo-file.csv文件,它在assets/csv文件夹中,所以如何从手机上下载,
这是我的HTML和组件代码.
HTML代码
<button ion-button type="button" block (click)="downloadFile('assets/csv/demo-file.csv', 'demo-file.csv')">Download Demo File</button>
Run Code Online (Sandbox Code Playgroud)
组件代码
public downloadFile(link: any, fileName: any) {
if (link) {
let path = null;
this.showWaitingLoading();
if (this.platform.is('ios')) {
path = this.file.documentsDirectory;
} else {
path = this.file.dataDirectory;
}
const transfer = this.transfer.create();
transfer.download(link, path + fileName).then(entry => {
this.dismissWaitingLoading();
this.openFile(entry.toURL());
}).catch(() => {
this.dismissWaitingLoading();
this.showToastMsg('error', "Something went wrong");
});
}
}
/* ================= OPNE FILE FUNCTION ===========*/
public openFile(path: any) {
this.fileOpener.open(path, 'application/*')
.then(() => …Run Code Online (Sandbox Code Playgroud) 我正在使用ngx-perfect-scrollbar进行滚动,垂直滚动运行良好,但水平滚动不起作用
<perfect-scrollbar style="max-width: 100px; max-height: 200px;">
<ul class="tab-menu">
<li>
<a>All</a>
</li>
<li>
<a>Company</a>
</li>
<li>
<a>People</a>
</li>
<li>
<a>Announcement</a>
</li>
<li>
<a>Event</a>
</li>
</ul>
</perfect-scrollbar>
Run Code Online (Sandbox Code Playgroud)我想使用PM2运行我的angular4应用,它将运行,但是当我关闭终端时,它将停止。
在这台服务器上已经运行了一个应用程序,它可以正常运行, 但是在我的应用程序中,当我打开终端时它将运行,否则它将停止
pm2启动server.js
我正在使用此命令运行我的应用程序,但是当我立即关闭终端时,它将停止,因此如何使用PM2永久运行此应用程序。
我得到了这种类型的数组,并且我想按整个数组将其仅按一列(first_name)分组,
[
{
first_name: "Apurv",
date: "2018-01-22",
is_present: "1",
}
{
first_name: "Lucky",
date: "2018-01-22",
is_present: "0",
}
{
first_name: "Apurv",
date: "2018-01-20",
is_present: "0",
}
{
first_name: "Lucky",
date: "2018-01-20",
is_present: "1",
}
]
Run Code Online (Sandbox Code Playgroud)
所以我怎么能从“ 组件 ” 按此数组分组?