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: write after end" with browserify 7.x #24
Comments
I am running into the same issue. |
Any update on this? I'm also encountering this error. Can I downgrade to a particular commit to get this going? Thanks. |
Hi guys - I'm not around a computer for the next week, but will look into it after that. In the meantime, a PR would be very much appreciated too! |
Your best bet would be to downgrade browserify if you need this now — I know that's a sucky answer though — sorry! |
@jmm @tnguyen14 @sam3k I might be brain-dead (it was a long day), but I'm really struggling to come up with a failing test case here. I just published 1.4.4 which adds sets a new~ish aliasify option. Maybe, maybe, maybe that solves something? I'd really, really, appreciate a PR that has a failing test case. |
The nature of the problem is a race condition, so its appearance is going to be hit or miss. I just tried again with 1.4.4 and it still happens. If you've been unable to reproduce it, I suggest you try something like this: var sleep = function (duration) {
var now = (new Date).getTime();
while ((new Date).getTime() < now + duration) {}
};
var filter = function (alias, dir, base) {
sleep(10000);
return path.join(dir, base);
};
var remapify_opts = [
{
// Glob that only matches one file
src: './view/**/*.js',
expose: 'app',
cwd: './src/rsrc',
filter: filter,
}
]; |
That's a great help! Thanks! |
d78e8cb (which references this issue) broke some existing functionality. I can no longer do this:
This gives the error:
I must instead do this:
However, there is no workaround for something like this:
@joeybaker Let me know if you want me to open a separate ticket for this issue. |
All of this is related to the pipeline changes introduced by browserify v7. I'm working on a fix, but if someone gets there before me, I won't mind! :) |
I don't understand the rationale for bumping (4c0faee) the browserify versions in the dependencies to versions that this currently doesn't work with? |
@joeybaker I am not able to check on this because grunt-browserify@3.2.1, which is the latest, is using browserify@6.3.4. With that said, my latest successful attempt involves the following:
I have not tried 1.4.4 with this setup yet, but will do so tomorrow and report the results. |
Confirmed, I got this working with 1.4.4. More details in #26. |
Any update on this fix? |
I've made progress here: https://github.com/joeybaker/remapify/tree/fix24 I'm hoping to finish this real soon. Sorry for the inconvenience! |
Hope to fix the problem, thanks! 😊 |
Really looking forward the fix. Thanks. |
Spent an hour trying to figure out what was wrong, please fix! Switching to 6.3.4 (from jmm) got it working for me. |
This has been broken since mid-December with the last update from @joeybaker being 1.5 months ago. Is there any path forward here? Any alternatives? I attempted to lock down versions to older versions but had no success. |
@benlakey I am using my patch from https://github.com/roncli/remapify/compare/roncli:master...issue-24-from-1.4.4 to temporarily workaround this issue. Alternatively, you can downgrade to 1.4.3 and grunt-browserify 2.1.4, those two play well together. |
Yes, there is a path forward. I've been super tied up at work and haven't had much time to finish the fix. It deals with using browserify's new pipeline API. I'm working on it in the fix24 branch, feel free to add on if you have time! |
@joeybaker Cool I figured it was something like that. Just wasn't sure if this project was abandoned in favor of some alternative. @roncli I'll try the downgrade versions you mention. |
Tried out the fix24 branch, it fixes the write after end bug, but some other issues are present. Would like to see this issue get some more light |
🎉 |
Given the following directory structure and build script (on linux):
It works with browserify 6.3.4, but generates the following error with >= 7.0.0:
The text was updated successfully, but these errors were encountered: