Open mikegrassotti opened 9 years ago
Thanks for reporting this. I haven't tried this in the latest ember-cli, I'll try to reproduce it tomorrow
I couldn't dig into this past week, but I did today and I wasn't able to reproduce it. do you still have this issue?
Yep. Using ember-cli 0.2.7 now, still able to reproduce. Tried installing another addon that uses generators (ember-simple-auth) and it works fine.
$ ember --version
version: 0.2.7
node: 0.12.3
npm: 2.11.0
$ ember new demo
$ cd demo
$ ember help generate
...ok....
$ ember install ember-cpm
$ ember help generate
version: 0.2.7
Requested ember-cli commands:
ember generate <blueprint> <options...>
Generates new code from blueprints.
aliases: g
--dry-run (Boolean) (Default: false)
aliases: -d
--verbose (Boolean) (Default: false)
aliases: -v
--pod (Boolean) (Default: false)
aliases: -p
--in-repo-addon (String) (Default: null)
aliases: -in-repo <value>, -ir <value>
Cannot find module 'inflection'
Error: Cannot find module 'inflection'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/mpg/code/tmp/docker/cowspeak/demo/node_modules/ember-cpm/blueprints/macro/index.js:3:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
$ npm uninstall ember-cpm
$ git checkout -- package.json
$ ember help generate
...ok....
$ ember install ember-cli-simple-auth
$ ember help generate
...ok...
Yesterday I tried this in a brand new application generated with ember new
and worked, so I feel that this must be some collision between this addon and another one.
Can you paste your package.json and bower.json?
I was able to replicate with both ember-cli 1.13.8 and ember-cli master by doing the same steps you guys did:
$ ember new cpmtest
$ cd cpmtest
$ ember install ember-cpm
$ ember help generate
version: 1.13.8
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
Requested ember-cli commands:
ember generate <blueprint> <options...>
Generates new code from blueprints.
aliases: g
--dry-run (Boolean) (Default: false)
aliases: -d
--verbose (Boolean) (Default: false)
aliases: -v
--pod (Boolean) (Default: false)
aliases: -p
--dummy (Boolean) (Default: false)
aliases: -dum, -id
--in-repo-addon (String) (Default: null)
aliases: -in-repo <value>, -ir <value>
Cannot find module 'inflection'
Error: Cannot find module 'inflection'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/chris/Projects/cpmtest/node_modules/ember-cpm/blueprints/macro/index.js:3:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
I also tried removing every single entry from package.json
's devDependencies
but ember-cli and ember-cpm, and I still get the same problem.
BTW this doesn't only apply to running the help, but trying to generat a macro using ember g macro foo
fails too.
I just got this when upgrading my app to ember-cli@1.13.8, using ember-cpm@1.3.4.
To further beat this dead horse :facepunch: :horse: , you can fix "bug" by running:
npm install --save inflection
in your project namespace
Alternatively, ember-cpm can hopefully one day add the "infection" package to its runtime dependencies in package.json