I have a unirest client folder among node modules.
On trying to require unirest:
var uniClient = require('unirest');
Following error appears:
module.js:472
throw err;
^
Error: Cannot find module 'unirest'
I also tried requiring as follows:
var uniClient = require('C:/node_modules/unirest');
But I get the following error:
module.js:472
throw err;
^
Error: Cannot find module 'C:/workspace/postman/webServices/target/node_modules/unirest'
I have checked and the index.js for unirest client is placed in C:/workspace/postman/webServices/target/node_modules/unirest.
I need to know - either, what is the standard path to require the unirest client (kindly do not suggest installation of package I have already done that but in this case I want to require sourcing the folder)
根据文档,该节点正在尝试执行以下操作: require
您应该在全局安装此npm模块。
npm install unirest -g
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.