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 dependencies not found #1980

Closed
timbergus opened this issue Jun 15, 2015 · 18 comments
Closed

Gulp dependencies not found #1980

timbergus opened this issue Jun 15, 2015 · 18 comments
Labels
confirmed-bug Issues with confirmed bugs. module Issues and PRs related to the module subsystem. windows Issues and PRs related to the Windows platform.

Comments

@timbergus
Copy link

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.

Could you please help me?

Thanks

@targos
Copy link
Member

targos commented Jun 15, 2015

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

@ChALkeR
Copy link
Member

ChALkeR commented Jun 15, 2015

Could be related to #1801 maybe?

@timbergus
Copy link
Author

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
Copy link
Author

I will check it ChALkeR, thanks to both of you.

@timbergus
Copy link
Author

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
Copy link
Member

ChALkeR commented Jun 15, 2015

@bnoordhuis

@ChALkeR
Copy link
Member

ChALkeR commented Jun 15, 2015

I will try to debug this later today.
Please, share a testcase.

@timbergus
Copy link
Author

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.

@brendanashworth brendanashworth added module Issues and PRs related to the module subsystem. windows Issues and PRs related to the Windows platform. labels Jun 15, 2015
@ChALkeR
Copy link
Member

ChALkeR commented Jun 16, 2015

Ah, this is Windows-specific. Sorry, can't test this, I do not have a Windows machine.

@ChALkeR
Copy link
Member

ChALkeR commented 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
Copy link
Author

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.

@ChALkeR
Copy link
Member

ChALkeR commented Jun 16, 2015

Is that reproducible with just the gulp-util module (without gulp)? With just the vinyl module (without gulp and gulp-util)?

@timbergus
Copy link
Author

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.

@vkurchatkin
Copy link
Contributor

Since it's windows specific I suspect that it has something to do with paths being too long

@timbergus
Copy link
Author

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.

@Fishrock123 Fishrock123 added the confirmed-bug Issues with confirmed bugs. label Jun 16, 2015
targos added a commit to targos/node that referenced this issue Jun 16, 2015
nodejs#1801 introduced internal fs methods to speed up require.
The methods do not call path._makeLong like their counterpart
from the fs module. This brings back the old behaviour.

Fixes: nodejs#1990
Fixes: nodejs#1980
Fixes: nodejs#1849
piscisaureus pushed a commit that referenced this issue Jun 16, 2015
#1801 introduced internal fs methods
to speed up require. The methods do not call path._makeLong like their
counterpart from the fs module. This brings back the old behaviour.

Fixes: #1990
Fixes: #1980
Fixes: #1849

PR-URL: https://github.com/nodejs/io.js/pull/1991/files
Reviewed-By: Bert Belder <bertbelder@gmail.com>
@silverwind
Copy link