Comments (8)
Found the reason: install.js
adds /usr/local/lib/node_modules
to $PATH
, however, I'm using nvm so the correct path is /home/ubuntu/.nvm/v0.10.41/lib/node_modules
.
from ircanywhere.
I have the same problem on Debian (Turnkey Nodejs appliance). Tried with and without nvm (including the workaround from @fnkr) but it did not work; neither on Node 0.10.41 nor on nodejs 12.7.
Tried the same from a basic Ubuntu 14 Container, installed node/npm via nvm (as suggested in the docs). Same error with and without fix.
Am I missing something here?
from ircanywhere.
Bad code. Some of my code was merged without testing.
from ircanywhere.
Also get this error. Can this be reopened?
from ircanywhere.
Having the same issue :(
leo@h2529749:/opt/ircanywhere$ sudo ./install.sh
[sudo] password for leo:
/opt/ircanywhere/install.js:201
function waitForRsInitiated(db, originalResult, waittime=30) {
^
SyntaxError: Unexpected token =
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
leo@h2529749:/opt/ircanywhere$ ls /usr/local/lib/node_modules/
nave npm pm2
from ircanywhere.
What's the status on this? Is there a way to quick-fix it?
from ircanywhere.
Quick? Revert my patch.
I'll leave this here, though, because it removes syntax errors.
--- a/install.js
+++ b/install.js
@@ -188,7 +188,7 @@ function isMongoRunning(isGlobal, path) {
db.command({replSetInitiate: null}, function(err, result) {
if (err === null || (result !== null && result.ok === 1)) {
- waitForRsInitiated(db, result);
+ waitForRsInitiated(db, result, 30);
} else {
console.log(err, result);
console.log(COLOUR.red, 'rs.initiate() failed. Needs manual intervention.');
@@ -198,20 +198,17 @@ function isMongoRunning(isGlobal, path) {
}
// waittime is in seconds
- function waitForRsInitiated(db, originalResult, waittime=30) {
- waittime = waittime * 2 // check every half-second, so double the count
+ function waitForRsInitiated(db, originalResult, waittime) {
+ waittime = waittime * 2; // check every half-second, so double the count
+ success = 0;
process.stdout.write(COLOUR.blue, 'Checking if the replica set is fully initiated...');
- while (waittime => 0) {
- db.command({rs.status}, function(err, result) {
+ while (waittime > 0) {
+ db.command({ 'rs.status': '' }, function(err, result) {
if (result.myState == 1) {
process.stdout.write(' Success!\n');
- break;
- } else if (waittime == 0) {
- process.stdout.write('\n');
- process.stdout.write(COLOUR.yellow, 'It appears that the mongodb replica set has not yet been initiated.');
- process.stdout.write(COLOUR.yellow, 'MongoDB may magically correct this in seconds or minutes, but please be aware of this issue.');
- break;
+ success = 1;
+ waittime = 0;
} else {
waittime = waittime - 1;
process.stdout.write('.');
@@ -219,6 +216,12 @@ function isMongoRunning(isGlobal, path) {
}
});
}
+ if (success == 0) {
+ process.stdout.write('\n');
+ process.stdout.write(COLOUR.yellow, 'It appears that the mongodb replica set has not yet been initiated.');
+ process.stdout.write(COLOUR.yellow, 'MongoDB may magically correct this in seconds or minutes, but');
+ process.stdout.write(COLOUR.yellow, 'please be aware of this potential issue.');
+ }
doneInstalling(db, originalResult);
}
Of course, I still don't know if this will work. Particularly db.command({ 'rs.status': '' }, ...
, because "selectors" aren't exactly documented. Pull request at your own risk. Last time I opened PR labeled 'untested code' it got accepted. Not going further down that rabbit hole.
from ircanywhere.
Maybe {rs:{initiate}}
, but I have no idea. rs.initiate()
works when feeding it through the shell. Don't know how to do it from node.
from ircanywhere.
Related Issues (20)
- website down HOT 7
- Cannot install
- irssi lag-o-meter reporting no connection
- Private message desktop notifications HOT 1
- IRCServer isn't working with mIRC
- Start Error
- [Enhancement] mysql backend for registrations
- Cannot join channels containing a / in the name
- npm publish please
- Abstract the db layer more complet so that we can use alternate db backends HOT 3
- Error when creating user. TypeError: msecs must be a number HOT 2
- feature request: email notifications on activity while disconnected
- website down HOT 3
- Install it on a web server
- install.sh doesn't work HOT 5
- Server hangs on bson JS fallback
- TypeError: Cannot read property 'ns' of null HOT 2
- End-to-End Encryption Support HOT 3
- How to install CentOS plugins (ircanywhere)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ircanywhere.