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

Cannot find module 'clone' (Gulp 3.9.0) #1100

Closed
timbergus opened this issue Jun 14, 2015 · 14 comments
Closed

Cannot find module 'clone' (Gulp 3.9.0) #1100

timbergus opened this issue Jun 14, 2015 · 14 comments

Comments

@timbergus
Copy link

I am using Windows 8.1 and Gulp 3.9.0, and I have just updated to io.js 2.3.0. When trying to run gulp in my project after the update, I receive the following message:

Cannot find module 'clone'

Inside the following path:

C:\Users\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-util\node_modules\vinyl\index.js:2:13

The full log is this:

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'm not sure what to do. Could you please help me?

Thanks

@callumacrae
Copy link
Member

What happens if you delete your gulp install using npm rm and then reinstall it?

@yocontra
Copy link
Member

Your install failed, npm installs are very unreliable. Delete it and try again.

@timbergus
Copy link
Author

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 try to install gulp with an older version of io.js 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

@yocontra
Copy link
Member

so it seems like an issue with iojs compatibility with npm - can you post the log from when you run npm install gulp ?

@yocontra yocontra reopened this Jun 16, 2015
@phated
Copy link
Member

phated commented Jun 16, 2015

@contra io has been busting npm in a bunch of versions, do we really want to start tackling this stuff?

@timbergus
Copy link
Author

As soon as I arrive home. I have there my PC. Meanwhile, I have opened this issue too in IO.js: Gulp dependencies not found #1980, just in case it could help. Your module is not the only one broken. Mock-fs and Semantic-UI seem to have similar problems too.

@ChALkeR
Copy link

ChALkeR commented Jun 16, 2015

mock-fs is monkey-patching fs, that voids all warranties, so it's their fault.
As for Semantic-UI, that bug is from 26 February, so it must have a different cause.

@callumacrae
Copy link
Member

@ChALkeR Not really nodejs/node#1941

@ChALkeR
Copy link

ChALkeR commented Jun 16, 2015

@callumacrae Are you implying that monkey-patching is (or should be) supported?

Example: new methods could be introduced in minor versions, and is someone monkey-patches the old methods, new methods could go around that. So it means that monkey-patching is not safe from breaking in a minor version by design.

@callumacrae
Copy link
Member

No, but I'm saying you shouldn't blame module authors for making modules that are made necessary because the core lacks functionality, and when npm itself relies on one such module, it's definitely in the interests of the core contributors to avoid breaking it.

That's not a discussion for here, though.

@yocontra
Copy link
Member

Seems to be an io.js/npm bug so I am going to close this - we are not on the io or npm teams and won't be fixing bugs in those projects

@bran921007
Copy link

I had the same problem, I fix it putting: npm install clone

If you have another error module just try to install it with: npm install [module name] and that's it

@bllli
Copy link

bllli commented Oct 6, 2017

I had the same problem too when I build Semantic-UI

$ gulp build
module.js:327
    throw err;
    ^

Error: Cannot find module 'gulp-clone'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/bllli/PycharmProjects/ReverseCourse/frontend/semantic/tasks/watch.js:15:18)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

I used those

$ sudo npm install clone
$ sudo npm install gulp-clone

and fixed it.

@patrickk
Copy link

patrickk commented Nov 2, 2018

I tried all the steps above and wasn't able to fix it. Turns out, moving (in my case, since it is dependent on clone) browser-sync to devDependencies in my package.json solved it. Just wanted to post in case anyone else runs into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants