You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this issue also open (well, now closed but not fixed) in Gulp's GitHub repo. The problem is that Gulp has stopped working in recent IO versions (I am using Windows 8.1 and Gulp 3.9.0, and I have just updated to io.js 2.3.0). The error message is:
Cannot find module 'clone'
And the full log is:
Error: Cannot find module 'clone'
at Function.Module._resolveFilename (module.js:332:15)
at Function.Module._load (module.js:282:25)
at Module.require (module.js:361:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\<username>\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-util\node_modules\vinyl\index.js:2:13)
at Module._compile (module.js:426:26)
at Object.Module._extensions..js (module.js:444:10)
at Module.load (module.js:351:32)
at Function.Module._load (module.js:306:12)
at Module.require (module.js:361:17)
I have completely removed all my global modules and even used npm cache clean. I have reinstalled the modules with my user and as administrator. I have done it globally and in my project directory and nothing happens. The error is still there.
I have installed gulp with an older version of io.js (to avoid npm problems) and then, I have try to run gulp with the following versions of io.js (without reinstalling gulp) and the result has been the following:
iojs-v2.0.2-x64 --> working
iojs-v2.1.0-x64 --> working
iojs-v2.2.0-x64 --> failed
iojs-v2.2.1-x64 --> failed
iojs-v2.3.0-x64 --> failed
Right now I am using iojs-v2.1.0-x64 and it works just fine.
Can you please provide the test that generates this error?
I have no problem with the following commands:
D:\Documents\Test>iojs -v
v2.2.1
D:\Documents\Test>gulp -v
[09:45:28] CLI version 3.9.0
[09:45:28] Local version 3.9.0
D:\Documents\Test>gulp
[09:45:41] No gulpfile found
As soon as I return home. There I have my PC. But the test was just change the io.js version installed. Gulp command worked on 2.1.0 but not in 2.2.0 and following (without doing any further modifications in gulp installation). I will try to check it deeply at home.
Using Windows 8.1 (because it works on Mac), just install iojs-v2.1.0-x64 and then Gulp. If you use gulp inside this project, it will work. Now update to iojs-v2.3.0-x64 and try to launch gulp again. It won't work. The project I have been using is a simple React example: https://gitlab.com/timbergus/reactTut01.git.
I have tried both combinations. It seems that in node_modules inside vinyl, after the installation, the clone component appears, but v2.3.0 cannot find it. But if I install again v2.1.0, no matter who installed the gulp component, it works again. I'm not sure the gulp installation is the problem. It's more the way v2.3.0 and v2.1.0 access the files inside node_modules. Being the module there, v2.1.0 finds it, while v2.3.0 can't.
You mean downloading them separately and replacing the ones that gulpdownloads, or using them as independent modules inside the project without calling gulp? I will try as soon as I arrive home.
Activity
targos commentedon Jun 15, 2015
Can you please provide the test that generates this error?
I have no problem with the following commands:
ChALkeR commentedon Jun 15, 2015
Could be related to #1801 maybe?
timbergus commentedon Jun 15, 2015
As soon as I return home. There I have my PC. But the test was just change the io.js version installed. Gulp command worked on 2.1.0 but not in 2.2.0 and following (without doing any further modifications in gulp installation). I will try to check it deeply at home.
timbergus commentedon Jun 15, 2015
I will check it ChALkeR, thanks to both of you.
timbergus commentedon Jun 15, 2015
It seems to be, because there is a similar error with Require error with io.js@2.2.x #43 and also with Undeclared dependency on "clone" causes npm install to fail #1871... I will try to double check this changes at home.
ChALkeR commentedon Jun 15, 2015
@bnoordhuis
ChALkeR commentedon Jun 15, 2015
I will try to debug this later today.
Please, share a testcase.
timbergus commentedon Jun 15, 2015
Using Windows 8.1 (because it works on Mac), just install iojs-v2.1.0-x64 and then Gulp. If you use
gulpinside this project, it will work. Now update to iojs-v2.3.0-x64 and try to launch gulp again. It won't work. The project I have been using is a simple React example: https://gitlab.com/timbergus/reactTut01.git.ChALkeR commentedon Jun 16, 2015
Ah, this is Windows-specific. Sorry, can't test this, I do not have a Windows machine.
ChALkeR commentedon Jun 16, 2015
Is the first step (installing gulp with io.js v2.1.0) needed, or you could install gulp with v2.3.0 and it's still broken?
timbergus commentedon Jun 16, 2015
I have tried both combinations. It seems that in
node_modulesinsidevinyl, after the installation, the clone component appears, but v2.3.0 cannot find it. But if I install again v2.1.0, no matter who installed thegulpcomponent, it works again. I'm not sure thegulpinstallation is the problem. It's more the way v2.3.0 and v2.1.0 access the files insidenode_modules. Being the module there, v2.1.0 finds it, while v2.3.0 can't.ChALkeR commentedon Jun 16, 2015
Is that reproducible with just the
gulp-utilmodule (withoutgulp)? With just thevinylmodule (withoutgulpandgulp-util)?timbergus commentedon Jun 16, 2015
You mean downloading them separately and replacing the ones that
gulpdownloads, or using them as independent modules inside the project without callinggulp? I will try as soon as I arrive home.vkurchatkin commentedon Jun 16, 2015
Since it's windows specific I suspect that it has something to do with paths being too long
timbergus commentedon Jun 16, 2015
Could be since there is no problem with Mac, but it's weird because it should not work with v2.1.0 either. The module is the same for both versions.
module: allow long paths for require on Windows
module: allow long paths for require on Windows
silverwind commentedon Jun 16, 2015
Fixed by 671e64a
timbergus commentedon Jun 17, 2015
Thanks a lot @silverwind and you guys.
Tallyb commentedon Mar 5, 2016
For all its worth - i had similar and fixed with updating gulp: npm update gulp -g