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.

Old graceful-fs version in gulp 3.x

See original GitHub issue

Opening this as a separate issue, as #1571 got comments closed (and describes a slightly different issue), and my comment in #1604 got moderated without a notice.

graceful-fs below version 4.0 (well, technically only 2.x and 3.x) is going to break on Node.js 7.x (which is going to happen in about 5 months from now).

If you are sure that everything is covered and understood correctly — just close this, please 😃 (and excuse me for opening a new issue), I am just making sure that nothing is missed here.

Your assessment of this issue in #1571 is not precise:

There is nothing wrong with the dependency, especially since it is only used in development. We will be updating or removing it in gulp 4 and the message will go away.

There are two warnings there — a warning on installation of graceful-fs lower than 3.x and a warning in runtime when an old graceful-fs version does unsupported stuff (which it does upon require).

I am only talking about the runtime warning here that comes from Node.js. That runtime warning is emitted only in those situations which would be turned into throws on Node.js 7.0 and above.

Now, just running gulp even with an empty gulpfile.js file emits this runtime warning:

(node:25661) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

which is going to turn into a throw in Node.js 7.0.

The dependency tree to graceful-fs looks like this:

└─┬ gulp@3.9.1 
  └─┬ vinyl-fs@0.3.14 
    ├─┬ glob-watcher@0.0.6 
    │ └─┬ gaze@0.5.2 
    │   └─┬ globule@0.1.0 
    │     └─┬ glob@3.1.21 
    │       └── graceful-fs@1.2.3 
    └── graceful-fs@3.0.8 

graceful-fs@1.2.3 is not reevalating native module sources, so it doesn’t trigger that warning and would not be affected by that throw in Node.js 7.0.

Only graceful-fs@3.0.8 causes that warning here, which is required only by vinyl-fs@0.3 (apart from being a devDependency). vinyl-fs@0.3 is loaded both by orchestrator (which is loaded only by gulp) and directly by gulp.

To my knowledge, there shouldn’t be breaking changes in graceful-fs update between 3.x and 4.0 and that should be a clean update.

A straightforward fix for to this would be to release a vinyl-fs 0.3.x with graceful-fs@4, perhaps.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
hgwoodcommented, Jun 14, 2016

@phated Would I be correct in saying that all gulp users will have to transition to v4, which means making significant gulpfile modifications, between the moment it is released and the moment Node 7 is released, otherwise they will be stuck in Node <7?

May I also ask what do you mean be “we don’t want to propagate those assumptions to end users”? Are you referring to the assumption that “there shouldn’t be breaking changes in graceful-fs update between 3.0 and 4.0”? Do you mean that you don’t want gulp ^3 users to be automatically upgraded to graceful-fs 4 because that would be automatically propagating a potential breaking change?

Simply trying to understand. 😃

2reactions
phatedcommented, Aug 9, 2016

I confirmed with a member of the node foundation that node 7 will never reach LTS, so it’s not really a problem. People should not be using odd releases (they are insanely buggy) and if they are comfortable with that, they should be comfortable enough using our branch. This project is worked on in everyone’s spare time, so it’ll take however long it takes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3
We are aware of the graceful-fs deprecation warning upon install of gulp 3.x. This is due to: 1. our graceful-fs devDependency 2. the...
Read more >
graceful-fs - npm
A drop-in replacement for fs, making various improvements.. Latest version: 4.2.10, last published: 9 months ago. Start using graceful-fs in ...
Read more >
Graceful-fs older version deprecated [#2775611] | Drupal.org
Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0 ...
Read more >
How to fix "ReferenceError: primordials is not defined" error
To pin graceful-fs to version 4.2.2 , we need to use an npm-shrinkwrap.json file, which lets you lock down the versions of installed...
Read more >
Error at task npm install on RHEL 7.6 - LIVEcommunity - 251546
... to npm\nnpm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js\nnpm WARN ...
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