screepers / screeps-multimeter

The most useful tool on your screeps workbench.
MIT License
89 stars 28 forks source link

Logging module not found. Release 1.8.3. #24

Closed Sriep closed 4 years ago

Sriep commented 4 years ago

I am running screeps on a private server on my laptop. I have managed to setup screeps-multimeter to work from both Linux and windows on both boots of my desktop.

However, the import thing is the logging module. Unfortunately, I can't get this to work. Here is my screeps-multimeter.json on both boots.

{
  "shard": "shard0",
  "password": "mypassword",
  "username": "myusername",
  "port": "21025",
  "hostname": "desktop-abcdef",
  "logFilename": "screeps.log",
  "plugins": ["Loging"]
}

I have also tried "Log", "log" and "logging" for plugin name. Windows it just fails with no explanation. Linux I get the stack trace.

piers@Mavin:~/Downloads/screeps-multimeter-1.8.3/bin$ multimeter
{ Error: Cannot find module 'Logging'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at requireRelative (/usr/lib/node_modules/screeps-multimeter/node_modules/require-relative/index.js:25:15)
    at _.each.name (/usr/lib/node_modules/screeps-multimeter/src/multimeter.js:240:22)
    at arrayEach (/usr/lib/node_modules/screeps-multimeter/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (/usr/lib/node_modules/screeps-multimeter/node_modules/lodash/index.js:3345:13)
    at Multimeter.loadPlugins (/usr/lib/node_modules/screeps-multimeter/src/multimeter.js:239:7)
    at Multimeter.run (/usr/lib/node_modules/screeps-multimeter/src/multimeter.js:175:10)
    at Promise.resolve.then.then (/usr/lib/node_modules/screeps-multimeter/bin/multimeter:19:9) code: 'MODULE_NOT_FOUND' }

On windows, I just used npm install -g screeps-multimeter to install and am not sure what version it is. On Linux I used release 1.8.3 from https://github.com/screepers/screeps-multimeter/releases - only Linux binaries seem to be there.

I noticed the logging is a very recent addition, so it might be a real bug rather than me being an idiot.

pyrodogg commented 4 years ago

The logging plugin is "built-in" and enabled by default. You don't need to specify it in the plugin[] array.

All you should need is to specify logFilename, which you're already doing. Try launching without specifying the plugin.

Sriep commented 4 years ago

Wow! It suddenly started working, might have been what you suggested. Anyway thanks.