Skip to content

Commit

Permalink
workaround npm/cli#2137
Browse files Browse the repository at this point in the history
  • Loading branch information
skadefro committed Jan 16, 2021
1 parent cc2a237 commit d82282c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion OpenFlowNodeRED/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openiap/nodered",
"version": "1.1.167",
"version": "1.1.168",
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
"main": "index.js",
"scripts": {
Expand Down
18 changes: 10 additions & 8 deletions OpenFlowNodeRED/src/node-red-contrib-openflow-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,16 @@ export class noderedcontribopenflowstorage {
}
getGlobalModulesDir() {
return new Promise<string>((resolve, reject) => {
var npm = require("global-npm")
var myConfigObject = {}
npm.load(myConfigObject, function (err) {
if (err) return reject(err)
// const test = npm.get('prefix');
// console.log(test);
resolve(npm.globalPrefix);
})
try {
var npm = require("global-npm")
// work around for https://github.com/npm/cli/issues/2137
npm.load(function (err) {
if (err) return reject(err)
resolve(npm.globalPrefix);
})
} catch (error) {
return reject(error)
}
});
}
DiffObjects(o1, o2) {
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.167
1.1.168
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openiap/openflow",
"version": "1.1.167",
"version": "1.1.168",
"description": "Simple wrapper around NodeRed, RabbitMQ and MongoDB to support a more scaleable NodeRed implementation.\r Also the \"backend\" for [OpenRPA](https://github.com/skadefro/OpenRPA)",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit d82282c

Please sign in to comment.