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

Running yo jhipster-elasticsearch-reindexer causes undefined error #34

Closed
catzsy opened this issue Oct 12, 2017 · 7 comments · Fixed by #35
Closed

Running yo jhipster-elasticsearch-reindexer causes undefined error #34

catzsy opened this issue Oct 12, 2017 · 7 comments · Fixed by #35

Comments

@catzsy
Copy link

catzsy commented Oct 12, 2017

Installed jhipster-elasticsearch-reindexer successfully:
λ npm install -g generator-jhipster-elasticsearch-reindexer

spawn-sync@1.0.15 postinstall C:\Users\Catz\AppData\Roaming\npm\node_modules\generator-jhipster-elasticsearch-reindexer\node_modules\spawn-sync
node postinstall

generator-jhipster-elasticsearch-reindexer@1.0.1
added 379 packages in 57.62s

tried running the command yo jhipster-elasticsearch-reindexer to start reindexing existing data in my database, and got the following error:
λ yo jhipster-elasticsearch-reindexer

C:\Users\Catz\AppData\Roaming\npm\node_modules\generator-jhipster-elasticsearch-reindexer\generators\app\index.js:27
JhipsterGenerator = generator.Base.extend({});
^

TypeError: Cannot read property 'extend' of undefined
at Object. (C:\Users\Catz\AppData\Roaming\npm\node_modules\generator-jhipster-elasticsearch-reindexer\generators\app\index.js:27:37)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.get [as jhipster-elasticsearch-reindexer:app] (C:\Users\Catz\AppData\Local\Yarn\config\global\node_modules\yo\node_modules\yeoman-environment\lib\store.js:38:27)
at Store.get (C:\Users\Catz\AppData\Local\Yarn\config\global\node_modules\yo\node_modules\yeoman-environment\lib\store.js:61:39)

@geraldhumphries
Copy link
Owner

geraldhumphries commented Oct 12, 2017 via email

@catzsy
Copy link
Author

catzsy commented Oct 12, 2017

Hi!
I am guessing that i have to downgrade the yeoman in my global not the yeoman-generator in jhipster-elasticsearch-reindexer right?
I've tried to downgrade my yeoman to 1.8.5

λ yarn global list
yarn global v1.1.0
info "generator-jhipster@4.9.0" has binaries:

  • jhipster
    info "yo@1.8.5" has binaries:
  • yo
  • yo-complete
    Done in 3.80s.

but seem to be getting the same error.

@catzsy
Copy link
Author

catzsy commented Oct 12, 2017

decided to upgrade my yo to the latest version again. :-)
then went to my AppData\Roaming\npm\node_modules\generator-jhipster-elasticsearch-reindexer and tried to update the package.json yeoman-generator version there.
specified 1.1.1 as the version of yeoman-generator

rerun the commands to create reindex page in my admin tab and now it works.

geraldhumphries added a commit that referenced this issue Oct 12, 2017
maintained backwards compatibility with older versions of Yeoman

fix #34
@geraldhumphries
Copy link
Owner

I pushed a fix. Can you upgrade to the latest version of Yeoman and try again?

@carloca68
Copy link

Hi Gerald, I was having the same problem. it's working fine now after your fix.

Cheers.

@geraldhumphries
Copy link
Owner

Thanks, I'll do a release tomorrow.

@catzsy
Copy link
Author

catzsy commented Oct 13, 2017

Hey Gerald,
checked on my end too. :-) all good. :-) thanks!!

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

Successfully merging a pull request may close this issue.

3 participants