felixhageloh / weather-widget

A weather widget for Übersicht
64 stars 32 forks source link

module.js:340 throw err #15

Closed geoff closed 7 years ago

geoff commented 9 years ago

I'm getting:

module.js:340 throw error; ^ Error:Cannot find module '/Users/xxxx/Dropbox/App Data/Ubersicht/weather.widget/get-weather' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3

Typed that myself, so spacing errors and typos my own. But that is the correct path to the widget's directory and get-weather is in the widget directory and I do have node installed (homebrew install). I don't know enough about this stuff to be specific or know if it's a bug or my own doing. I just like the widget and would like to use it. All I have done is dropped the widget in the widget folder then edited the city, region, and units in TextMate.

I only have one other widget running, that being Brett Terpstra's LoadBar, which works.

felixhageloh commented 9 years ago

Hi! Is that reported in the Übersicht console or where are you seeing this error?

geoff commented 9 years ago

It's what shows up on the screen where the widget would display the weather. I moved and set my widget folder back to ~/Library/Application Support/Übersicht/widgets and it works just fine.

felixhageloh commented 9 years ago

hmm strange. Does it work in any other folder? Curious to see if this happens only inside the dropbox folder ...

MABeeskow commented 9 years ago

I have the same problem, but I want to use a German city. Is region then for non-American cities the country or the state of the country?

felixhageloh commented 9 years ago

The best is to check https://weather.yahoo.com how they do it there. I am also always surprised on how they list non American cities :/

jamms commented 8 years ago

Sorry to have add my 2 cents worth, but I'm getting exactly the same problem - on my Mac desktop AND my laptop. Both running latest El Capitan. Here it is:

weather-widget-weather-widget-index-coffee: "module.js:340 throw err; ^ Error: Cannot find module '/Volumes/Data/Data-Files/Users/XXX/Library/Application Support/Übersicht/widgets/weather.widget/get-weather' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:289:25) at Function.Module.runMain (module.js:457:10) at startup (node.js:138:18) at node.js:974:3

Any ideas as I haven't a clue how to go about trying to troubleshoot this!

TIA

felixhageloh commented 8 years ago

@jamms I think you might have a slightly different problem: It looks like you have your widget two folders deep, like /weather-widget/weather-widget/. You can either remove the extra nesting or you need to adjust the path to the get-weather command inside index.coffee

jamms commented 8 years ago

Yes, rather embarrassingly, I noticed that not long after I posted, I corrected the nesting and it still wasn't working. However, when I updated Ubersicht to the latest version, everything started working, so happy days!