question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gulp 4: The value of "mode" is out of range. Received 33279"

See original GitHub issue

I have a gulpfile.js in the top level of the project and then I have my tasks split into files in a gulp/tasks. Running the gulpfile.js from the project root with the source files in src/* directory

**What were you expecting to happen?**s When running from the root directory I expect to pass the full [relative] path to the gulp.src method.

What actually happened?

RangeError [ERR_OUT_OF_RANGE]: The value of “mode” is out of range. Received 33279 at Object.fs.fchmod (fs.js:1024:11) at Object.fchmod (/www/gaiatools.com/node_modules/graceful-fs/polyfills.js:237:17) at mode (/www/gaiatools.com/node_modules/vinyl-fs/lib/file-operations.js:237:10) at onStat (/www/gaiatools.com/node_modules/vinyl-fs/lib/file-operations.js:227:14) at /www/gaiatools.com/node_modules/graceful-fs/polyfills.js:287:18 at FSReqWrap.oncomplete (fs.js:150:5)

It seems Gulp is starting in the src directory, because when I remove the src prefix from the path it works as expected. The paths weren’t an issue prior to upgrading to Gulp 4

In another project having src at the front of the path doesn’t cause issues. So I’m at a loss for why it’s an issue in this project.

Please post a sample of your gulpfile (preferably reduced to just the bit that’s not working)

// /gulpfile.js
var requireDir = require ( 'require-dir' );
requireDir ( './gulp/tasks', {
	recurse : true,
} ); // no difference if I use require('./gulp/tasks/copy')

// gulp/tasks/copy.js file
gulp.task('copy', css);

function css() {
	return gulp.src(['src/css/*.css'])
		.pipe(gulp.dest( 'web/css' ));
}

Then I run it from the command line gulp copy This isn’t the only task that has this issue either. My Sass compiler task has the same issue when src is prefixed to the front of the path. I just used this one because it’s less lines and doesn’t use any plugins

What version of gulp are you using? Gulp 4

What versions of npm and node are you using? node v10 npm v6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
demurgoscommented, May 16, 2018

This is a Node 10 bug (https://github.com/nodejs/node/issues/20498).

It should be fixed soonish. Revert to Node 9 or wait for their fix.

3reactions
phatedcommented, Jun 22, 2018

According to their changelog at https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.5.0 - it seems that node 10.5 (released on 6-20-18) has finally landed this fix.

I’m unlocking this to get feedback on if this node problem is fixed for you so I can close the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Everytime I run gulp anything, I get a assertion error.
I get the same error when using Gulp. The solution is to switch to Gulp version 3.9.1, both for the local version and...
Read more >
dest() - gulp.js
Whenever a Vinyl object is passed through the stream, it writes the contents and other details out to the file system at the...
Read more >
Gulp for Beginners | CSS-Tricks
Gulp is a tool that helps you out with several tasks when it comes to web development. It's often used to do front...
Read more >
Super simple Gulp tutorial for beginners - freeCodeCamp
But there's a definite learning curve to learning Gulp. One of the biggest hurdles is figuring out the seemingly.
Read more >
gulp 4 | Object Computing, Inc.
Before attempting to run a gulp task that is defined in the project gulpfile.js , cd to the top project directory or a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found