无法在Angular 8中解决'Child_process'

时间:2019-07-15 09:39:48

标签: child-process angular8

我试图在我的项目中添加一个child_process以执行python文件。

我尝试使用以下方式自行安装该模块:

npm install child_process

这确实使我的编辑器可以识别它,并且可以自动完成功能。

import { spawn } from 'child_process';

const test = child.spawn('python', ['pythonfile.py']);
test.stdout.on('data', (data) => {
    console.log(data);
}

我希望该模块已经通过node.js或我安装了,但事实并非如此。

Module not found: Error: Can't resolve 'child_process' in 'C:\oof\oof\project\src\app\services

0 个答案:

没有答案