[英]NodeJS gives Cannot find module './parser' error while running Handlebars
[英]Nodejs: Cannot find module error while trying to require unirest module
我在節點模塊之間有一個unirest客戶文件夾。
在嘗試要求獨占者時:
var uniClient = require('unirest');
出現以下錯誤:
module.js:472
throw err;
^
Error: Cannot find module 'unirest'
我也嘗試要求如下:
var uniClient = require('C:/node_modules/unirest');
但是我收到以下錯誤:
module.js:472
throw err;
^
Error: Cannot find module 'C:/workspace/postman/webServices/target/node_modules/unirest'
我已經檢查過,並將Unirest客戶端的index.js放在C:/ workspace / postman / webServices / target / node_modules / unirest中。
我需要知道-或者,需要unirest客戶端的標准路徑是什么(請不要建議我已經安裝了軟件包,但是在這種情況下,我需要采購該文件夾)
根據文檔,該節點正在嘗試執行以下操作: require
您應該在全局安裝此npm模塊。
npm install unirest -g
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.