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

ember help generate fails after installing ember-cpm package with ember-cli v0.2.5 #121

Open
mikegrassotti opened this issue May 26, 2015 · 7 comments

Comments

@mikegrassotti
Copy link

$ ember --version
version: 0.2.5
node: 0.12.3
npm: 2.10.0

$ ember new demo
$ cd demo
$ ember help generate
...ok....
$ npm install ember-cpm --save-dev
$ ember help generate
version: 0.2.5
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/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)
@cibernox
Copy link
Owner

Thanks for reporting this. I haven't tried this in the latest ember-cli, I'll try to reproduce it tomorrow

@cibernox
Copy link
Owner

cibernox commented Jun 7, 2015

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?

@mikegrassotti
Copy link
Author

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

@cibernox
Copy link
Owner

cibernox commented Jun 8, 2015

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?

@csantero
Copy link
Contributor

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.

@kellyselden
Copy link
Contributor

I just got this when upgrading my app to [email protected], using [email protected].

@foxnewsnetwork
Copy link

To further beat this dead 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

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

5 participants