错误:生成节点ENOENT

时间:2018-05-21 19:18:26

标签: javascript express electron

我正在使用Express服务器处理我的Electron应用程序,当我使用电子打包器构建它时,我收到错误。

CREATE TABLE DEPARTMENT
(DEPARTMENT_ID NUMBER PRIMARY KEY,
DEPARTMENT_NAME VARCHAR(30) NOT NULL
);

CREATE TABLE JOBS
(JOB_ID NUMBER PRIMARY KEY,
JOB_TITLE VARCHAR(35) NOT NULL,
MIN_SALARY DECIMAL NOT NULL,
MAX_SALARY DECIMAL NOT NULL
);

CREATE TABLE EMPLOYEES
(EMPLOYEE_ID NUMBER PRIMARY KEY,
FIRST_NAME VARCHAR(20) NOT NULL,
LAST_NAME VARCHAR(25) NOT NULL,
EMAIL VARCHAR(25) NOT NULL,
PHONE_NUMBER VARCHAR(20) NOT NULL,
HIRE_DATE DATE NOT NULL,
JOB_ID NUMBER NOT NULL,
SALARY DECIMAL NOT NULL,
DEPARTMENT_ID NUMBER NOT NULL,
CONSTRAINT emp_job_fk FOREIGN KEY(JOB_ID) REFERENCES JOBS(JOB_ID),
CONSTRAINT emp_department_fk FOREIGN KEY(DEPARTMENT_ID) REFERENCES DEPARTMENT(DEPARTMENT_ID)
);

INSERT INTO DEPARTMENT (DEPARTMENT_ID,DEPARTMENT_NAME)
VALUES(1,'IT');
INSERT INTO DEPARTMENT (DEPARTMENT_ID,DEPARTMENT_NAME)
VALUES(2,'Sales');

INSERT INTO JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY)
VALUES (1,'IT Administrator',250000.00,50000.00);
INSERT INTO JOBS (JOB_ID,JOB_TITLE,MIN_SALARY,MAX_SALARY)
VALUES (2,'Salesman',200000.00,40000.00);

这是我的main.js,其中称为子进程

select department_id,department_name,total_salary 
from(

select  department_id,department_name, SALARY, count(*) as total_salary from(
select dep.department_id , dep.department_name ,emp.SALARY,
DENSE_RANK() OVER (PARTITION BY department_name ORDER BY salary)
from departments dep

inner join employees emp on dep.DEPARTMENT_ID = emp.DEPARTMENT_ID

)
GROUP BY SALARY)

有没有人知道这个错误的解决方案?

1 个答案:

答案 0 :(得分:0)

您的app.js脚本很可能出现问题。你应该挂钩一些事件监听器来了解真正发生的事情。您可以收听错误,退出,关闭,断开连接和消息事件。您还可以连接到许多其他内容,例如stdin,stdout,stderr。查看不同事件的文档,挂钩所有事件并输出一些信息,您应该能够找到问题。

您还应该检查您的快速服务是否可以直接从命令行运行,而不是从此Electron应用程序中运行。如果确实如此,那么你可能会错路一条。这可能是child_process找不到要运行的“node”应用程序,或者找不到你的启动脚本。在任何一种情况下,您都可以使用path模块来构建正确的路径。