Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error "ENOENT on dotfile" started happening in 0.8.2 #48

Closed
mreinstein opened this issue Apr 23, 2014 · 17 comments
Closed

error "ENOENT on dotfile" started happening in 0.8.2 #48

mreinstein opened this issue Apr 23, 2014 · 17 comments

Comments

@mreinstein
Copy link
Contributor

I'm getting ENOENT errors when changing watched files.

{ [Error: ENOENT, rename 'assets/javascripts/.wrapp.js']
  errno: 34,
  code: 'ENOENT',
  path: 'assets/javascripts/.wrapp.js' }
@ustun
Copy link

ustun commented May 7, 2014

Same here, restarting watchify fixes it.

@nibblebot
Copy link

+1 on this. restart does not fix anything for me.
i'm also seeing multiple log output for singular file change occasionaly..

0.10.5 node
4.1.5 browserify
0.10.1 watchify
linux host

# initial run
1301 bytes written to public/build/bundle-app.js (0.19 seconds)
# file changed
1279 bytes written to public/build/bundle-app.js (0.22 seconds)
{ [Error: ENOENT, rename 'public/build/.bundle-app.js']
  errno: 34,
  code: 'ENOENT',
  path: 'public/build/.bundle-app.js' }
{ [Error: ENOENT, rename 'public/build/.bundle-app.js']
  errno: 34,
  code: 'ENOENT',
  path: 'public/build/.bundle-app.js' }
# file changed; two log outputs...
1301 bytes written to public/build/bundle-app.js (0.06 seconds)
1301 bytes written to public/build/bundle-app.js (0.05 seconds)
{ [Error: ENOENT, rename 'public/build/.bundle-app.js']
  errno: 34,
  code: 'ENOENT',
  path: 'public/build/.bundle-app.js' }

I also tried using the --delay 1000 undocumented option to see if I could reduce race condition, but I saw no real change.

@nibblebot
Copy link

@mreinstein can you update the issue title to reflect the issue. something like "ENOENT on dotfile" or similar

@mreinstein mreinstein changed the title something broke in 0.8.2 error "ENOENT on dotfile" started happening in 0.8.2 May 27, 2014
@clehner
Copy link

clehner commented Jun 4, 2014

I was seeing this issue as well and then realized it was because there was an old watchify process still running, which had somehow detached from the terminal's job control and seemed to be causing a race condition, trying to build the same bundle file. So I killed that process and then things worked fine.

@nibblebot
Copy link

@clehner This is a likely explanation for my bug as I was indeed background watchify in a parent process with intent to kill it later (at end of parent process) and ended up with some stray children watchify processes. Haven't seen this issue since I killed the surviving background processes.

@joeellis
Copy link

joeellis commented Sep 1, 2014

Found this when searching for this bug, and I too had a background process still running that I wasn't aware of. Killed the process, bug went away. I think this issue can probably be closed since that solution seems to work well.

@pluma
Copy link

pluma commented Dec 30, 2014

+1

This is still happening for me with the current version of watchify. I'm guessing this has something to do with multiple files being modified in rapid succession (i.e. faster than watchify can update the bundle). This seems to happen eventually even when there are no other node/watchify processes around when I start watchify (and I don't manually start new ones).

@ivan-kleshnin
Copy link

+1

2 similar comments
@gasi
Copy link

gasi commented Mar 4, 2015

+1

@rodryquintero
Copy link

+1

@zertosh
Copy link
Member

zertosh commented Mar 26, 2015

This is the same issue as #83. I'm tracking it there. I've got a fix in #169. I would really appreciate it if someone test drove it and reported their node and OS version in the PR comments.

@zertosh
Copy link
Member

zertosh commented Mar 26, 2015

The fix was published as watchify@2.6.2

@Gijsjan
Copy link

Gijsjan commented Mar 27, 2015

EDIT: with node v0.12 it is working. I was still on v0.10

I'm running 2.6.2 but still encountering this issue.

Command:

$ watchify src/index.coffee --outfile build/development/js/main.js --transform coffeeify --extension=".coffee" --transform jadeify --extension=".jade" -v

Output:

{ [Error: ENOENT, rename 'build/development/js/.main.js']
    errno: 34,
    code: 'ENOENT',
    path: 'build/development/js/.main.js' }
{ [Error: ENOENT, rename 'build/development/js/.main.js']
    errno: 34,
    code: 'ENOENT',
    path: 'build/development/js/.main.js' }

@zertosh
Copy link
Member

zertosh commented Mar 27, 2015

@Gijsjan: Hmm I'm getting reports that it's fixed and I can't reproduce it anymore. Can you tell me what OS and editor you're using? Also, it would be very very helpful if you could give me a repo I could clone, or a full gist, to reproduce the problem.

@shamansir
Copy link

I have 3.6.0, but yet started getting this issue with a command like:

$ watchify ./src/main.js -t browserify-css -o ./dist/player.js`

Output:

{ [Error: ENOENT, rename 'dist/.player.js'] errno: -2, code: 'ENOENT', path: 'dist/.player.js' }

Nor watchify, nor other packages were updated or changed. Node.js v0.12.2.

Restarting watchify fixes that, but every new change to file breaks it again. Mac OS X.

@shamansir
Copy link

Hmm, it turned out that the reason is just another watchify instance being run in some other/background process. I was sure it's not there, but it actually was. Sorry.

@shamansir
Copy link

I think if there could be a friendlier message for that case, that would be good.

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

No branches or pull requests