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

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

Closed
KnightYoshi opened this issue May 16, 2018 · 9 comments
Closed

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

KnightYoshi opened this issue May 16, 2018 · 9 comments
Labels

Comments

@KnightYoshi
Copy link

KnightYoshi commented May 16, 2018

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

@demurgos
Copy link
Member

This is a Node 10 bug (nodejs/node#20498).

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

@phated phated added the solved label May 16, 2018
@mossiomylv
Copy link

I have the same problem except that in my case
When there are too many files of entries to treat in my task of minification it shows me this error

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 (/Users/frederic/Documents/workspace-angular-js/ipCentrexResiliationUi/node_modules/graceful-fs/polyfills.js:237:17)
at mode (/Users/frederic/Documents/workspace-angular-js/ipCentrexResiliationUi/node_modules/gulp/node_modules/vinyl-fs/lib/file-operations.js:237:10)
at onStat (/Users/frederic/Documents/workspace-angular-js/ipCentrexResiliationUi/node_modules/gulp/node_modules/vinyl-fs/lib/file-operations.js:227:14)
at /Users/frederic/Documents/workspace-angular-js/ipCentrexResiliationUI/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js: 150: 5)

Thank you for helping me understand what's wrong I remember that I use

Node 10 & Gulp 4

@klimashkin
Copy link

Still have this issue in 10.3.0

RangeError [ERR_OUT_OF_RANGE]: The value of "mode" is out of range. Received 33204
    at Object.fs.fchmod (fs.js:1056:11)
    at Object.fchmod (/workspace/node_modules/graceful-fs/polyfills.js:237:17)
    at mode (/workspace/node_modules/vinyl-fs/lib/file-operations.js:237:10)
    at onStat (/workspace/node_modules/vinyl-fs/lib/file-operations.js:227:14)
    at /workspace/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:183:5)

@phated
Copy link
Member

phated commented May 30, 2018

@klimashkin please don't "update" us on the fact that node still hasn't fixed their issue... It just adds yet-more noise to our lives.

@gulpjs gulpjs locked and limited conversation to collaborators May 30, 2018
@phated
Copy link
Member

phated commented 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.

@gulpjs gulpjs unlocked this conversation Jun 22, 2018
@Delagen
Copy link

Delagen commented Jun 22, 2018

@phated Yes. 10.5.0 is the first version after 10.0.0 where CI pipeline finished successfully.

@adiron
Copy link

adiron commented Jun 23, 2018

I encountered this error on node v10.3.0. However after seeing this thread and upgrading to v10.5.0, the error has gone away and everything works fine. It was probably it. (Thought i'd let you and future visitors in this thread know)

@demurgos
Copy link
Member

I also confirm that I no longer encounter this error after updating to Node 10.5.0.

@phated
Copy link
Member

phated commented Jun 28, 2018

Thanks all for letting us know. I'm going to close this now.

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

7 participants