Semantic-ui: Error: Cannot find module 'gulp-help'

Created on 29 Nov 2014  Â·  26Comments  Â·  Source: Semantic-Org/Semantic-UI

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.

Build Tools

Most helpful comment

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

All 26 comments

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

Thanks marking as question for others searching.

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?

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.

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.

Just 3 steps

npm install --save semantic-ui
cd semantic
gulp

Update is

npm update

What issue are you running into?

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

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).

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.

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

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?

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

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.

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

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?

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

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

On Thursday, July 23, 2015, iamachimp [email protected] 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
https://github.com/Semantic-Org/Semantic-UI/issues/1324#issuecomment-124137848
.

@undercase

Thanks, will do.

@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.

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.

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

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 )

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

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

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

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 [email protected] 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:

https://github.com/Semantic-Org/Semantic-UI/issues/1324#issuecomment-196585068

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

deneuxa picture deneuxa  Â·  3Comments

vinhtq picture vinhtq  Â·  3Comments

playgithub picture playgithub  Â·  3Comments

zhaoyao91 picture zhaoyao91  Â·  3Comments