Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

TypeError: Path must be a string #76

Open
Kureev opened this issue Jul 27, 2015 · 2 comments
Open

TypeError: Path must be a string #76

Kureev opened this issue Jul 27, 2015 · 2 comments

Comments

@Kureev
Copy link

Kureev commented Jul 27, 2015

Hi all,
Trying to watch 1 file on Mac OS X + io.js 2.4.0 like this:

const watcher = PathWatcher.watch('./dist/bundle.js');

and get following stack trance

fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
TypeError: path must be a string
    at TypeError (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at PathWatcher.watch (/Users/xamd/Projects/browserify-react-live/server/index.js:46:25)
    at emitTwo (events.js:87:13)
    at PathWatcher.emit (events.js:172:7)
    at HandleWatcher.<anonymous> (/Users/xamd/Projects/browserify-react-live/node_modules/pathwatcher/lib/main.js:134:28)
    at emitThree (events.js:97:13)
    at HandleWatcher.emit (events.js:175:7)
    at HandleWatcher.onEvent (/Users/xamd/Projects/browserify-react-live/node_modules/pathwatcher/lib/main.js:60:23)

suggestions?

P.S. I've tried a lot of different combinations of path to watch, nothing works

@kevinsawicki
Copy link
Contributor

It looks like the error is coming from PathWatcher.watch (/Users/xamd/Projects/browserify-react-live/server/index.js:46:25) which means not in PathWatcher but in the position in that file which is not part of this project.

@abhishekkashyap092
Copy link

what is the option to resolve it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants