Gulp: Broken with iojs v1.0.3

Created on 20 Jan 2015  ยท  28Comments  ยท  Source: gulpjs/gulp

Using iojs v1.0.3 throws error :

Esan-iMac:$gulp [mytask]
module.js:324
    throw err;
          ^
Error: Cannot find module '/usr/local/lib/node_modules/gulp/node_modules/v8flags/cache/4.1.0.7.flags.json'

and installing iojs v1.0.2 over 1.0.3 solved this.

Don't know where this bug belongs; pls forward if not gulp-specific.
I think iojs upgraded V8 upgrade from 3.31 to 4.1 ??

Most helpful comment

@lucasmotta @callumacrae

I have the exact same issue with io.js and gulp earlier. But I could confirm that 3.8.11 play nicely with io.js. Tried with npm rm -g gulp, it did not work for me. Here is what I did to make it work,

ls /usr/local/lib/node_modules/gulp

Well, it should be there if you installed it via npm install -g gulp. then do this

rm -rf /usr/local/bin/gulp
rm -rf /usr/local/lib/node_modules/gulp

It should remove the old/latest gulp binary, then do the clean installation

npm i -g gulp

Now it should work.

All 28 comments

@tkellen Any idea?

Reinstalling doesn't help:

(This also doesn't work with v1.0.2 for me, neither gulp nor installing it)

_Edit:_ only doesn't work when using global install, otherwise it works. Is there manual path set somewhere?.

root@obelix:~# npm install -g gulp

[email protected] install /root/.nvm/versions/io.js/v1.0.3/lib/node_modules/gulp/node_modules/v8flags
node fetch.js

module.js:340
throw err;
^
Error: Cannot find module '/root/.nvm/versions/io.js/v1.0.3/lib/node_modules/gulp/node_modules/v8flags/fetch.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
npm ERR! Linux 3.13.0-44-generic
npm ERR! argv "/root/.nvm/versions/io.js/v1.0.3/bin/iojs" "/root/.nvm/versions/io.js/v1.0.3/bin/npm" "install" "-g" "gulp"
npm ERR! node v1.0.3
npm ERR! npm v2.2.0
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node fetch.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] install script 'node fetch.js'.
npm ERR! This is most likely a problem with the v8flags package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node fetch.js
npm ERR! You can get their info via:
npm ERR! npm owner ls v8flags
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
root@obelix:~#

Need to backport a fix to use liftoff 2x/v8flags 2x

I don't think this is worth backporting. It will land in the gulp-cli change and I am 99% sure that gaze will cause yet another failure on iojs

Anything we can do to help fix this? The io.js website is building out tooling that uses gulp so we'd like to get this fixed ASAP :)

Because of the holdup in gulp-cli backporting (blocked by an npm bug), I think we can backport the liftoff stuff. That being said, gulp 3.x still won't work on iojs because of gaze (we use an old version)

@mikeal I would say just use the 4.0 branch. I don't think we can backport fixes for iojs into the 3.x stuff (easily) without breaking anything.

@contra ok, thanks. any estimate on when 4.0 will be CURRENT?

@mikeal Trying to have it ready by January 31st https://github.com/gulpjs/gulp/milestones/gulp%204 but you can use the 4.0 stuff off github for now

Some additional features that were going to be in 4.0 have been moved to 4.1 so we can release io.js support and the new task system ASAP.

+1 same issue still happens on io.js v1.0.4.

Removed the package of "gulp#v3.8.10", manually downloaded from gulp 4.0 branch, drop in the "node_modules" folder to replace "gulp" module.

Then go in "node_modules/gulp" to run "npm install", and "sudo" is required here.

Back to the gulp project, run any gulp + tasks, still run in issues

module.js:324
    throw err;
          ^
Error: Cannot find module '/usr/local/lib/node_modules/gulp/node_modules/v8flags/cache/4.1.0.12.flags.json'

I am using liftoff 2x/v8flags 2x now, should I specific some config argument there as well?

It's been a couple of hours since I ran into this issue, and I believe I fixed it by reinstalling gulp locally (didn't have to do it for the cli).

@mattma, I could be wrong, and will probably be corrected, but I think you have to add the code from the 4.0 branch in both the global node_modules and your local node_modules.

The awkward game of git clone-npm install-copy-paste stuff arround-thing seems to do the trick. I can use gulp now, and even my 3.x gulpfiles do not break with iojs 1.0.4 and gulp 4.0.

I've had success with various versions of iojs (inc. v.1.1.0) by installing [email protected] and [email protected] locally, then having a postinstall script that runs npm rebuild gulp-cli so that ./node_modules/.bin/gulp gets repointed to gulp-cli instead of gulp. My package.json kinda looks like this:

{
  "devDependencies": {
    "gulp": "3.8.10",
    "gulp-cli": "0.1.5"
  },
  "scripts": {
    "postinstall": "npm rebuild gulp-cli"
  }
}

Gulp isn't working for me at all on node v0.12.0 on both windows and OSX. Downgrading to v0.10.36 fixed it of course.

We are taking a look at this and probably will rebase out my CLI changes that weren't published due to a blocking npm bug. Once rebased, we can do the liftoff 2.0 upgrade and publish a bug fix version. I just pinged @contra but I believe he is traveling.

Just run node .../npm/node_modules/gulp/node_modules/v8flags/fetch.js and it will create the specific flag file for the V8 version. For example 4.1.0.14.flags.json or 3.31.74.1.flags.json.

Had similar issues with node v0.12.0. Forcing the fetch by running node_modules/gulp/node_modules/v8flags/fetch.js helped.

We've fixed this and published at 3.8.11 and it works on iojs and node 0.12 from our initial testing.

I'm still having this issue with the latest version of Gulp (3.8.11) and io.js (v1.3.0):

dropnshare git:master โฏ iojs -v                                                                                                                                                                    
v1.3.0
dropnshare git:master โฏ gulp                                                                                                                                                                         
module.js:322
    throw err;
          ^
Error: Cannot find module '/usr/local/lib/node_modules/gulp/node_modules/v8flags/4.1.0.14.flags.json'
    at Function.Module._resolveFilename (module.js:320:15)
    at Function.Module._load (module.js:262:25)
    at Module.require (module.js:349:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:25:22)
    at Module._compile (module.js:444:26)
    at Object.Module._extensions..js (module.js:462:10)
    at Module.load (module.js:339:32)
    at Function.Module._load (module.js:294:12)
    at Function.Module.runMain (module.js:485:10)

@lucasmotta Have you tried reinstalling your global version of gulp?

npm rm -g gulp && npm i -g gulp

@lucasmotta @callumacrae

I have the exact same issue with io.js and gulp earlier. But I could confirm that 3.8.11 play nicely with io.js. Tried with npm rm -g gulp, it did not work for me. Here is what I did to make it work,

ls /usr/local/lib/node_modules/gulp

Well, it should be there if you installed it via npm install -g gulp. then do this

rm -rf /usr/local/bin/gulp
rm -rf /usr/local/lib/node_modules/gulp

It should remove the old/latest gulp binary, then do the clean installation

npm i -g gulp

Now it should work.

@mattma (cc @callumacrae), your solution worked for me... thanks for your help guys :)

@lucasmotta I am glad that works for you. It took me a while and thought that was something related to Gulp, but it is not.

:clap: :clap: :clap: :clap:

thanks @mattma I had the exact same issue and your solution worked perfectly where the other suggestions didn't!

thanks @mattma ! this works for me!

How to fix this Issue in Windows 10 ?

@RapurHarishBabu If you're still using iojs v1.0.3, I'd suggest updating first! Otherwise, try the steps mentioned in this issue by @mattma.

@callumacrae I has Fixed my Issuse by Installing every Gulp file in New folder one by one :) Now everything works Awesome :+1:

Was this page helpful?
0 / 5 - 0 ratings