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

Error: Cannot find module 'gulp-help' #1324

Closed
rspeer opened this issue Nov 29, 2014 · 26 comments
Closed

Error: Cannot find module 'gulp-help' #1324

rspeer opened this issue Nov 29, 2014 · 26 comments
Milestone

Comments

@rspeer
Copy link

rspeer commented Nov 29, 2014

I'm following the instructions at http://learnsemantic.com/guide/expert.html.

Here's a minimal version of what I did:

bower install semantic-ui
npm install -g gulp
cd bower_components/semantic-ui
gulp

What I get is:

Error: Cannot find module 'gulp-help'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/rspeer/code/irepad/bower_components/semantic-ui/gulpfile.js:12:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Installing the module named "gulp-help" didn't help, and neither did going back to 1.0. Someone mentioned that they resolved this on #691, but didn't say how.

@rspeer
Copy link
Author

rspeer commented Nov 29, 2014

The answer is that I missed the step of running npm install inside the Semantic directory, not just in my project directory.

@rspeer rspeer closed this as completed Nov 29, 2014
@jlukic
Copy link
Member

jlukic commented Dec 2, 2014

Thanks marking as question for others searching.

@jlukic jlukic added the Question label Dec 2, 2014
@bdefore
Copy link

bdefore commented Mar 16, 2015

I just into this as well after an npm install followed by the automatic choice. There's no package.json inside the semantic directory so it doesn't make a difference to run npm install again in there. Perhaps the docs are outdated?

@jlukic
Copy link
Member

jlukic commented Mar 16, 2015

Build tools were updated recently, this issue was using the old build tools that required npm install.

semantic.json is added to the root of your project, and points to the semantic install folder, this is generated during post-install scripts (which you refer to). This is used the next time you install to determine how to proceed (install script vs update script)

To update semantic you just need to update using npm as you would normally, and separate post install scripts should trigger running updates.

@bdefore
Copy link

bdefore commented Mar 16, 2015

Do I understand the steps correctly for how to add semantic-ui to an existing project?

npm install --save semantic-ui
(press enter through all of the gulp steps for automatic, this task says Finished, but I needed to ctrl-c out of it)
npm update
npm install
cd semantic
gulp

I'm having issues with an existing dependency not updating correctly so I also had to blow away my node_modules after installing semantic-ui, then doing another npm update and npm install.

I'm still running into errors, each time I do it I'm getting different issues at the gulp step, about either gulp not being installed, gulp-help or vinyl not being installed, etc.

@jlukic
Copy link
Member

jlukic commented Mar 16, 2015

Just 3 steps

npm install --save semantic-ui
cd semantic
gulp

Update is

npm update

What issue are you running into?

@franciscolourenco
Copy link

I have the same issue as the OP with just the 3 commands
npm 2.12.1

@vgchl
Copy link

vgchl commented Jul 21, 2015

I'm also running into this problem (Error: Cannot find module 'gulp-help').
I didn't have gulp installed (this step seems to be missing from the docs completely).

@jlukic
Copy link
Member

jlukic commented Jul 22, 2015

I dont believe it was always the case, but it appears having gulp installed locally is not enough. You will need to install gulp globally.

I'll be revising the guide. I'm also working on fixing some other issues with build tools that i'd like to release shorty.

@undercase
Copy link

I installed gulp globally, and I am still having this issue.

@dink
Copy link

dink commented Jul 23, 2015

I'm also having the same issue:
Error: Cannot find module 'gulp-help'

I installed it into an existing metalsmith project, so maybe that's why it causes problems.

MY project structure is:

myproject/semantic

When I look into:

myproject/node_modules/semantic-ui/node_modules

all the necessary modules are there, including gulp-help, so I think the gulpfile inside myproject/semantic is not aware of the directory structure, or something like that. I'm not competent enough to debug this myself, unfortunately.

EDIT:

Ok, it appears that Error: Cannot find module 'gulp-help' is looking for this module inside my myproject/semantic directory instead of globally at myproject/node_modules/semantic-ui/node_modules. Is there a way to define the actual directory in the gulpfile?

@jlukic
Copy link
Member

jlukic commented Jul 23, 2015

Are you importing tasks into an external gulp file? Incoming fix in next patch for this #2668

Can you try against next branch?

npm install semantic-org/semantic-ui#next

@jlukic jlukic added this to the 2.1 milestone Jul 23, 2015
@dink
Copy link

dink commented Jul 23, 2015

@jlukic

No, I don't, or at least I haven't yet. I'm just following the instructions as everyone else to get started.

In my current metalsmith directory (myproject), I do:

npm install --save semantic-ui, then follow the instructions. So now I have the following:

myproject/
    node_modules
    semantic/
        src
        tasks
        gulpfile.js
    metalsmith.js
    package.json
    semantic.json

When I cd into semantic/ to run the generated gulpfile, that's when the error appears.

As a dirty hack to see what's happening, I moved the node_modules directory from myproject/node_modules/semantic-ui/node_modules into myproject/semantic and it runs fine.

@jlukic
Copy link
Member

jlukic commented Jul 23, 2015

When installing semantic-ui, gulp-help should be installed as a peer dependency. This means it should exist in both node_modules/gulp-help and node_modules/semantic-ui/gulp-help/

Did the install hang after "setup" script (that you ctrl+ced out of)? This could keep you from grabbing peerDependencies (which occurs after setup).

This is also fixed in next

@dink
Copy link

dink commented Jul 23, 2015

Yes, the install did hang after setup, so I had to exit manually.

This is also fixed in next

Does this mean the next version?

@undercase
Copy link

Yes, just uninstall semantic and reinstall it with this command:

npm install Semantic-Org/Semantic-UI#next -save

On Thursday, July 23, 2015, iamachimp notifications@github.com wrote:

Yes, the install did hang after setup, so I had to exit manually.

This is also fixed in next

Does this mean the next version?


Reply to this email directly or view it on GitHub
#1324 (comment)
.

@dink
Copy link

dink commented Jul 23, 2015

@undercase

Thanks, will do.

@jlukic
Copy link
Member

jlukic commented Jul 23, 2015

@iamachimp Yes, to avoid deciding whether the 'next' release is a patch or minor release before publishing all work for the next release is just referred to as next.

When the feature-set is complete I attach a specific version number.

@jlukic jlukic modified the milestones: 2.1, 2.0.7 Jul 23, 2015
@ghost
Copy link

ghost commented Dec 24, 2015

For anyone else following the Getting Started guide and hitting this error, try upgrading npm. It looks like the docs assume you're using npm 3, which installs dependencies alongside semantic. However, if you're still using npm 2 (which is the default for the current Node LTS release v4), then semantic's dependencies are installed in a node_modules subdirectory, which causes a 'cannot find module gulp-help' error.

Not sure if this issue is all that related, but this is the first result on Google for the exact error message so hopefully leaving this here will save someone a bit of time in future.

@jlukic
Copy link
Member

jlukic commented Dec 25, 2015

Thanks, and please let me know how I can help adjust the guide to accommodate.

@ghost
Copy link

ghost commented Dec 29, 2015

Also you get an 'help' of undefined typerror if you use gulp@4 alpha.

I have npm v3.3.12 , gulp 3.9.0 and I can't build the semantic, when I run the gulp or gulp build it shows me NO error, all goes correct with green letters bulding, it finishes at 1 second ( very fast) BUT I don't see any files inside any /dist folder, no new css file added to the whole project's folder. ( I searched all over the internet but maybe this is a new bug because of the new version of semantic, I don't know, please https://gitter.im/Semantic-Org/Semantic-UI )

@popara
Copy link

popara commented Jan 7, 2016

When I hit above error, I just cd to node_modules/semantic-ui/ and do gulp build from there.
It seems that error is with node not figuring out that he is symlink, and that node_modules are just there.

There is definitely issue with fresh installs on "stale npms"? Mine is

> npm --v 
2.14.7

@jlukic
Copy link
Member

jlukic commented Jan 8, 2016

Its my issue with removing peer dependencies in last release. It'll be fixed in next patch.

@rmstinson
Copy link

Hi all, wanted to see if this had been fixed yet? Still having this same issue. Thanks

@popara
Copy link

popara commented Mar 15, 2016

I don't have those problems anymore. I have updated semantic, and I have
built stuff just fine.

On Tue, Mar 15, 2016 at 1:28 AM rmstinson notifications@github.com wrote:

Hi all, wanted to see if this had been fixed yet? Still having this same
issue. Thanks


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:

#1324 (comment)

mokolodi1 added a commit to mokolodi1/Semantic-UI-Docs that referenced this issue Nov 22, 2016
I cloned https://github.com/Semantic-Org/Semantic-UI/ fresh for my docs folder and had never run `npm install` in the freshly cloned folder before. Hopefully this extra sentence will help another poor lost soul like me.

[Here is the comment where I found the fix to why `gulp build-docs` wasn't working](Semantic-Org/Semantic-UI#1324 (comment))
@tomasswood
Copy link

I had this error and a bunch of others all looping around. In the end I had to do this:

  1. Delete node_modules
  2. Delete package-lock.json
  3. Call the following:
npm cache clean
npm install --save semantic-ui

Note: On npm v5+ you will need to call npm cache clean --force

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

No branches or pull requests

10 participants