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

Creates a RangeError: Array buffer allocation failed when used with cdnizer #83

Closed
computersarecool opened this issue Feb 1, 2017 · 5 comments
Labels

Comments

@computersarecool
Copy link

cdnizer is awesome,
so is run-sequence.

However, when I use them together I run into an issue. Currently my sequence looks like this:

gulp.task('prep', callback => {
   runSequence('clean:dist', 'standard', 'wiredepDist', 'babel', 'ngAnnotate', 'stylus', 'useref', 'cdnizer', callback)
}) 

When I run gulp prep I get:

[20:19:38] 'cdnizer' errored after 25 ms
|[20:19:38] RangeError: Array buffer allocation failed
|    at Buffer.Uint8Array (native)
|    at FastBuffer (buffer.js:11:5)
|    at createUnsafeBuffer (buffer.js:38:12)
|    at allocate (buffer.js:181:12)
|    at Function.Buffer.allocUnsafe (buffer.js:141:10)
|    at tryCreateBuffer (fs.js:474:21)
|    at Object.fs.readFileSync (fs.js:519:14)
|    at Object.Module._extensions..json (module.js:585:20)
|    at Module.load (module.js:487:32)
|    at tryModuleLoad (module.js:446:12)
|[20:19:38] 'prep' errored after 4.3 s
|[20:19:38] RangeError in plugin 'run-sequence(cdnizer)'
|Message:
|    Array buffer allocation failed
|Stack:

But when I run gulp cdnizer alone, I do not have this issue. Is this something I am doing wrong on my end?

@OverZealous
Copy link
Owner

I've never seen that before. What's the code for the cdnizer step look like? What version of Node & Gulp are you running?

@OverZealous
Copy link
Owner

Generally speaking, almost all errors with run-sequence are due to misconfigured tasks—specifically, ones that don't handle async correctly. If any step along the way doesn't return a stream, promise, or use a callback, then it's possible your cdnizer task is running before another step completes.

@computersarecool
Copy link
Author

I am sure that is it. I will investigate my tasks closer and report back.

@OverZealous
Copy link
Owner

@computersarecool Did you ever find out any more about this?

@computersarecool
Copy link
Author

It was due, as you thought, to a misconfigured task. Thank you.

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

No branches or pull requests

2 participants