Closed nkarthik closed 6 years ago
Im also getting an error on nmp install command. scr doesn't exist and others. See attached file. I really need this to work. Npm install Error.txt
EDIT: I did sudo npm install and the error was gone but now on the "npm run test" it gives an error
mongo-oplog@2.0.2 test /home/sam/Downloads/node_modules/mongo-oplog xo && mocha index.js:1:1 ✖ 1:1 Expected empty line after require statement not followed by another require. import/newline-after-import ✖ 1:27 Unable to resolve path to module ./lib. import/no-unresolved
2 errors
You need to run npm run build
before npm run test
BTW. May I ask why are you installing mongo-oplog
from the source instead of in a project? Typically you will only add it to your project and setup your replica set and done.
What do you mean by source instead of a proj. I want to test this functionality for a proj (ATM I have nothing. Just some collections). I have the replica setup in place. I want to use the event trigger-like functionality. Do something on oplog events. The install and run build commands are giving the same error. Src doesn't exist. I'm following the ReadMe.md.
[root@stlrx2540m1-68 mongo-oplog-master]# mongo --host stlrx2540m1-68 --port 27021 MongoDB shell version: 3.2.10 connecting to: stlrx2540m1-68:27021/test Server has startup warnings: Wed Mar 1 10:46:59.119 I CONTROL [initandlisten] WARNING: You are running this process as the root user, which is not recommended. Wed Mar 1 10:46:59.119 I CONTROL [initandlisten] Wed Mar 1 10:46:59.120 I CONTROL [initandlisten] Wed Mar 1 10:46:59.120 I CONTROL [initandlisten] WARNING: You are running on a NUMA machine. Wed Mar 1 10:46:59.120 I CONTROL [initandlisten] We suggest launching mongod like this to avoid performance problems: Wed Mar 1 10:46:59.120 I CONTROL [initandlisten] numactl --interleave=all mongod [other options] Wed Mar 1 10:46:59.120 I CONTROL [initandlisten]
npm WARN lifecycle mongo-oplog@2.0.2~prepublish: cannot run in wd %s %s (wd=%s) mongo-oplog@2.0.2 npm run build /usr/src/mongo-oplog/mongo-oplog-master mongo-oplog@2.0.2 /usr/src/mongo-oplog/mongo-oplog-master
(removed command outputs due to log size)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN babel-loader@6.3.2 requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed. [root@stlrx2540m1-68 mongo-oplog-master]# make test make: Nothing to be done for `test'. [root@stlrx2540m1-68 mongo-oplog-master]# npm install fsevents@1.0.0 npm ERR! Linux 2.6.32-642.3.1.el6.x86_64 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "fsevents@1.0.0" npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.0.0: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! notsup Valid OS: darwin npm ERR! notsup Valid Arch: any npm ERR! notsup Actual OS: linux npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request: npm ERR! /usr/src/mongo-oplog/mongo-oplog-master/npm-debug.log [root@stlrx2540m1-68 mongo-oplog-master]# less /usr/src/mongo-oplog/mongo-oplog-master/npm-debug.log [root@stlrx2540m1-68 mongo-oplog-master]#
if anyone successfully installed and tested mongo-oplog, please share your steps and guide me . I want to run the tailing of oplog.
regards, Nagalingam