简体   繁体   中英

How to provide path to node_modules to ant <exec> to run node

I want to make an ant target to run nodejs command, but I am not aware how can I provide the path to node_modules at run time. I am trying something like this.

<exec executable="${env.NODE_HOME}/node" >
    <env key="PATH" value="relative_path_to_node_modules}" />
    <arg value="parameter"/>
</exec>

Actually, needed to update environment variable NODE_PATH. In my opinion, node search for this particular env variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM