yeoman / generator-polymer

Scaffold out a Polymer project
http://polymer-project.org
926 stars 150 forks source link

yo polymer building error #145

Closed ghost closed 9 years ago

ghost commented 9 years ago

I have just updated my Polymer development tools and I get some errors, although everything was working fine before. Here is what I get when trying 'yo polymer' in the console :

/usr/lib/node_modules/generator-polymer/node_modules/yeoman-generator/lib/base.js:444 this.env.sharedFs.on('change', writeFiles); ^ TypeError: Object # has no method 'on' at run (/usr/lib/node_modules/generator-polymer/node_modules/yeoman-generator/lib/base.js:444:21) at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:330:20) at /usr/lib/node_modules/yo/lib/cli.js:91:9 at Environment.resolver.lookup (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:50:12) at init (/usr/lib/node_modules/yo/lib/cli.js:66:7) at pre (/usr/lib/node_modules/yo/lib/cli.js:53:3) at Object. (/usr/lib/node_modules/yo/lib/cli.js:155:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

or when I type 'yo' in the console and choose 'polymer' :

/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9379 throw e; ^ TypeError: Object # has no method 'on' at run (/usr/lib/node_modules/generator-polymer/node_modules/yeoman-generator/lib/base.js:444:21) at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:330:20) at module.exports (/usr/lib/node_modules/yo/lib/routes/run.js:20:11) at Router.navigate (/usr/lib/node_modules/yo/lib/router.js:36:30) at PromptUI.completed (/usr/lib/node_modules/yo/lib/routes/home.js:76:20) at PromptUI.onCompletion (/usr/lib/node_modules/yo/node_modules/inquirer/lib/ui/prompt.js:69:10) at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1965:12) at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1902:14) at AutoDetachObserverPrototype.completed (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9397:23) at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1902:14)

Any idea on what when wrong during the updates (no error thrown) ? Thanks for reading and all the best.

PS : I am running on

  • Fedora 20
  • npm 2.5.1
  • yo 1.4.5
  • generator-polymer 0.7.0
  • bower 1.3.12
  • grunt 0.4.5
  • grunt-cli 0.1.13
  • gem 2.1.11
  • sass 3.4.12
  • compass 1.0.3
aendra-rininsland commented 9 years ago

You should update Yo, I just experienced the same issue.

npm install -g yo

ghost commented 9 years ago

Hi aendrew,

That did the trick ! After having broken several times my npm system with npm update -g, I used to rely on this script :

!/bin/sh

set -e set -x

for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2) do npm -g install "$package" done

Seems like it doesn't always fetch latest versions and I have to go back to the old npm install -g.

Thanks a lot, everything is fine now. Back to code ! All the best,