Error on startup, looking for file package.js

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
22 Jan 2015 07:04 #1 by Trekkan
So after many frustrating hours attempting to get node-gyp to work on my Windows machine (no fault at all of this project), I finally got it to work.

However, I'm running into an error during startup. When creating a file watcher, it's attempting to find a file called "package.js" in the root of the project, but this file doesn't exist and then things die with the below error. Is it meaning to look for package.json? In anycase, I checked the repo and there's no file "package.js". That's where I'm at at the moment. =)

Error:
fs.js:1063
    throw errnoException(process._errno, 'watch');
          ^
Error: watch ENOENT
    at errnoException (fs.js:1031:11)
    at FSWatcher.start (fs.js:1063:11)
    at Object.fs.watch (fs.js:1088:11)
    at EventEmitter.havoc.watch (g:\Data\dev\uu2\Havoc\havoc.js:229:15)
    at EventEmitter.havoc.init (g:\Data\dev\uu2\Havoc\havoc.js:55:9)
    at Object.<anonymous> (g:\Data\dev\uu2\Havoc\havoc.js:267:8)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

-Troy

Please Log in or Create an account to join the conversation.

More
22 Jan 2015 14:32 #2 by plamzi
File watching is OS-dependent and last time I read the node.js documentation on it, there were idiosyncrasies under Windows. I would make sure I have the latest node.js version and then consult the docs. It could just be something silly, like fs.watch expecting to see "\" instead of "/" for directory separators.

If you get stuck, you can try to disable dynamic code loading in config.js.

Please Log in or Create an account to join the conversation.

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
22 Jan 2015 23:50 #3 by Trekkan
Replied by Trekkan on topic Error on startup, looking for file package.js
Yeah, I thought it might be an OS issue (and might still be), but it is attempting to add a watcher on package.js, which is a file that doesn't exist. There are four files it's attempting to watch, package.js is the third in the array (I'm at work right now and can't look it up).

The first two work fine (and they exist), it dies on the file that doesn't exist. Which is why I'm thinking it's not an OS dependent issue, since the first two work fine.

Please Log in or Create an account to join the conversation.

More
22 Jan 2015 23:55 #4 by plamzi
The file havoc.js is listing certain directories on start-up and based on that it generates a list of files to watch. I would look for a hidden file called package.js in that location and remove it if found. Could be something extraneous created by GitHub etc.

Please Log in or Create an account to join the conversation.

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
23 Jan 2015 00:00 #5 by Trekkan
Replied by Trekkan on topic Error on startup, looking for file package.js
Ahh ok. Might it be, because I created a package.json file? I created that because well, it's much easier to deal with all of the dependencies, etc.

Please Log in or Create an account to join the conversation.

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
23 Jan 2015 01:16 #6 by Trekkan
Replied by Trekkan on topic Error on startup, looking for file package.js
Ok, the problem is that it's picking up my "package.json" file as "package.js" for some reason. If I rename that file, it gets past that point. So I guess whatever function is matching the .js in .json and thinking it's a file it needs to mess with.

Anyway, probably something that should be fixed, but I've worked past it for the moment.

Please Log in or Create an account to join the conversation.

More
23 Jan 2015 01:38 #7 by plamzi
I can fix it but it's a narrow case. The advantage of GitHub is you can propose a fix and submit a pull request.

Please Log in or Create an account to join the conversation.

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
23 Jan 2015 01:40 #8 by Trekkan
Replied by Trekkan on topic Error on startup, looking for file package.js
Fair enough, I'm just not familiar enough with the code yet to fix it. Once I am, I'll send pull requests for anything I can.

Please Log in or Create an account to join the conversation.

More
23 Jan 2015 14:43 #9 by plamzi
This morning's commit should cause the monitoring logic to ignore any .json files (see the util.js diff). It also addresses all other issues you've reported so far. Keep it up.

Please Log in or Create an account to join the conversation.