N
N
nuclear_kote2017-06-26 19:42:39
Node.js
nuclear_kote, 2017-06-26 19:42:39

How to include cli module in node task?

In general, there is ionic, which is usually launched through the console (for example, ionic platform add android)
I want to do some assembly on top, I try to connect var ionic = require ('ionic') in the node, cannot find module is issued.
How can it be connected?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abberati, 2017-06-26
@abberati

to connect the module via require, you need to install it in the project;
if you need to use ionic-cli, you can use child process to work with the terminal directly from the code. with this approach, you do not need to install the package in the project.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question