bayleeadamoss / zazu-calculator

9 stars 5 forks source link

Zazu calculator not functional #2

Open meditatingCybermind opened 7 years ago

meditatingCybermind commented 7 years ago

I'm receiving this error in the debugger when trying to do something, in this case pi * 3:

ERROR: [11:42:16][tinytacoteam/zazu-calculator:Service] 
Cannot find module 'typed-function'
{
  "block": "Service",
  "level": "error",
  "message": "Cannot find module 'typed-function'",
  "plugin": "tinytacoteam/zazu-calculator",
  "stack": [
    "Error: Cannot find module 'typed-function'",
    "    at Module._resolveFilename (module.js:455:15)",
    "    at Function.Module._resolveFilename (/Applications/Zazu.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)",
    "    at Function.Module._load (module.js:403:25)",
    "    at Module.require (module.js:483:17)",
    "    at require (internal/module.js:20:19)",
    "    at Object.<anonymous> (/Users/tparsons/.zazu/plugins/tinytacoteam/zazu-calculator/node_modules/mathjs/lib/core/typed.js:1:100)",
    "    at Module._compile (module.js:556:32)",
    "    at Object.Module._extensions..js (module.js:565:10)",
    "    at Module.load (module.js:473:32)",
    "    at tryModuleLoad (module.js:432:12)"
  ],
  "time": "2017-01-05T16:42:16.345Z"
}

I just installed Zazu today so I haven't had a chance to find all the ins-and-outs, but I have ensured that my .zazurc is correct

{
  "hotkey": "cmd+space",
  "theme": "tinytacoteam/zazu-playful-theme",
  "plugins": [
    "tinytacoteam/zazu-calculator",
    "tinytacoteam/zazu-file-finder",
    "tinytacoteam/zazu-fallback",
    "tinytacoteam/zazu-template",
    "tinytacoteam/zazu-system",
    {
      "name": "tinytacoteam/zazu-clipboard",
      "variables": {
        "ClipboardKey": "cmd+shift+v"
      }
    }
  ]
}
bayleedev commented 7 years ago

Yes, your configuration file is perfect. My best guess is that there was an error during a npm install of the dependencies. Do you mind trying:

rm -rf ~/.zazu/plugins/tinytacoteam/zazu-calculator

and restarting zazu?

meditatingCybermind commented 7 years ago
ERROR: [12:11:40][tinytacoteam/zazu-calculator:Service] 
Cannot find module 'mathjs'
{
  "block": "Service",
  "level": "error",
  "message": "Cannot find module 'mathjs'",
  "plugin": "tinytacoteam/zazu-calculator",
  "stack": [
    "Error: Cannot find module 'mathjs'",
    "    at Module._resolveFilename (module.js:455:15)",
    "    at Function.Module._resolveFilename (/Applications/Zazu.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)",
    "    at Function.Module._load (module.js:403:25)",
    "    at Module.require (module.js:483:17)",
    "    at require (internal/module.js:20:19)",
    "    at Object.<anonymous> (/Users/tparsons/.zazu/plugins/tinytacoteam/zazu-calculator/calculator.js:1:95)",
    "    at Module._compile (module.js:556:32)",
    "    at Object.Module._extensions..js (module.js:565:10)",
    "    at Module.load (module.js:473:32)",
    "    at tryModuleLoad (module.js:432:12)"
  ],
  "time": "2017-01-05T17:11:40.074Z"
}

Looks like you're on the right track with missing dependencies. I'll see about just running npm install and seeing if that changes anything

Edit: Running npm install from .../zazu-calculator fixed the issue, after rm -rf .../zazu-calculator and restarting zazu did not

bayleedev commented 7 years ago

Is there a npm-debug.log in the calculator directory?

meditatingCybermind commented 7 years ago

There is not.

cecoates commented 7 years ago

I had the same issue regarding the mathjs error, but your solution of rm -rf ~/.zazu/plugins/tinytacoteam/zazu-calculator and restarting fixed it.