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

Object #<Environment> has no method 'instantiate' #502

Closed
UnbrandedTech opened this issue Aug 29, 2014 · 12 comments
Closed

Object #<Environment> has no method 'instantiate' #502

UnbrandedTech opened this issue Aug 29, 2014 · 12 comments

Comments

@UnbrandedTech
Copy link

Node Version: v0.10.29
Yeoman Version: v1.2.1

Unbrandedtech:www james$ yo angular-fullstack:route Area

/Users/james/npm/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:551 generator = this.env.instantiate(Generator, options);

TypeError: Object #<Environment> has no method 'instantiate'

at composeWith (/Users/james/npm/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:551:26)
at yeoman.generators.Base.extend.compose (/Users/james/npm/lib/node_modules/generator-angular-fullstack/route/index.js:6:10)
at /Users/james/npm/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:387:14
at processImmediate [as _immediateCallback] (timers.js:336:15)

The endpoint works fine but the route does not work.

@UnbrandedTech
Copy link
Author

I tried multiple combinations of versions:
N:0.10.29 & Y:1.2.1
N:0.10.29 & Y:1.2.0
N:0.10.31 & Y:1.2.1
N:0.10.31 & Y:1.2.0

@kingcody
Copy link
Member

@UnbrandedTech this may be a dumb question; but have you updated the generator npm update -g generator-angular-fullstack lately?

@UnbrandedTech
Copy link
Author

@kingcody I just installed it last weekend but i just updated it
Unbrandedtech:valuads james$ npm list -g generator-angular-fullstack
/Users/james/npm/lib
└── [email protected]

Still getting the same error though.

@kingcody
Copy link
Member

@UnbrandedTech thanks for the feedback on the issue, I'll definitely let you know if I find anything relevant.

@UnbrandedTech
Copy link
Author

@kingcody Thanks I'll try to find someway to fix/get around it.

@JaKXz
Copy link
Collaborator

JaKXz commented Aug 30, 2014

@UnbrandedTech try re-running the generator in your project, and be ready for some overwrites:

$ yo angular-fullstack

@UnbrandedTech
Copy link
Author

@JaKXz Thank you for the suggestion but no dice. When I ran the generator again, it overwrote:
Gruntfile.js
client/app/main/main.html
client/index.html
client/favicon.ico
server/routes.js

But upon running yo angular-fullstack:route area
This was the error again.

/Users/james/npm/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:551
    generator = this.env.instantiate(Generator, options);
TypeError: Object #<Environment> has no method 'instantiate'
    at composeWith (/Users/james/npm/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:551:26)
    at yeoman.generators.Base.extend.compose (/Users/james/npm/lib/node_modules/generator-angular-fullstack/route/index.js:6:10)
    at /Users/james/npm/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:387:14
    at processImmediate [as _immediateCallback] (timers.js:345:15)

@UnbrandedTech
Copy link
Author

@kingcody I just tried to delete the whole project and start again but when running the generator for the first time I got the same error. I ran it again and used the existing .yo-rc file from the previous run and it worked perfectly. I don't know whats not there when i first start and there the second time....

@kingcody
Copy link
Member

hmm, that is interesting... I'm glad you have a working project now!

Perhaps a dependency caching issue...

@UnbrandedTech
Copy link
Author

@kingcody Those commands still do not work. I thought it would help if I told you it was errored out in the start up. I uninstalling Node and trying from scratch.

@UnbrandedTech
Copy link
Author

Uninstalled everything and now it works. Thank you @kingcody for all your help!

@kingcody
Copy link
Member

kingcody commented Sep 2, 2014

@UnbrandedTech glad to hear it. So the issue has been resolved for you?

@JaKXz JaKXz closed this as completed Sep 19, 2014
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

3 participants