using node modules
Answered
Hello.
Similarly this
npm install json2csv -g
and then in mongobooster
varjson2csv = require('json2csv');
I try to do
npm install request -g
var rq = require('request');
and get the error
{
"code": "MODULE_NOT_FOUND",
"message": "Cannot find module 'request'",
"stack": "script:1:10"
}
Please, help to solve this problem.
With best regards,
Dmitry.
You don't need to install npm modules globally. You can install npm modules to your user data directory.
1. Main Menu -> Help -> Open User Data Directory
2. Righ-click menu: New Terminal at Folder https://tinyurl.com/kv9b5m2
3. run: > npm i request-promise ;//or request, you have to promisify it later.
You don't need to install npm modules globally. You can install npm modules to your user data directory.
1. Main Menu -> Help -> Open User Data Directory
2. Righ-click menu: New Terminal at Folder https://tinyurl.com/kv9b5m2
3. run: > npm i request-promise ;//or request, you have to promisify it later.
Thank you very much!
Thank you very much!
Hello,
I've installed the timespan node module in my MongoBooster user data directory, and it seems to be installed.
However, when I try to use it in MongoBooster I get the following error:
{
"message" : "Cannot find module 'timespan'",
"stack" : "script:1:16",
"code" : "MODULE_NOT_FOUND"
}
Here's how I'm requiring the module:
Any suggestions?
Thanks,
Jeff
Hello,
I've installed the timespan node module in my MongoBooster user data directory, and it seems to be installed.
However, when I try to use it in MongoBooster I get the following error:
{
"message" : "Cannot find module 'timespan'",
"stack" : "script:1:16",
"code" : "MODULE_NOT_FOUND"
}
Here's how I'm requiring the module:
Any suggestions?
Thanks,
Jeff
Replies have been locked on this page!