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

Blueprints do not work with new ember-cli #146

Open
mriska opened this issue Jun 28, 2017 · 4 comments · May be fixed by #151
Open

Blueprints do not work with new ember-cli #146

mriska opened this issue Jun 28, 2017 · 4 comments · May be fixed by #151

Comments

@mriska
Copy link
Contributor

mriska commented Jun 28, 2017

› ember -v
ember-cli: 2.13.2
node: 7.7.4
os: darwin x64

› ember new route-test

...

› cd route-test

› ember generate route foo
installing route
  create app/routes/foo.js
  create app/templates/foo.hbs
updating router
  add route foo
installing route-test
  create tests/unit/routes/foo-test.js

› ember install ember-cli-coffeescript
NPM: Installed ember-cli-coffeescript
Installed addon package.

› ember generate route bar
installing route
Cannot read property 'moduleName' of undefined
TypeError: Cannot read property 'moduleName' of undefined
  at __name__ (/Users/mriska/route-test/node_modules/ember-source/blueprints/route/index.js:35:30)
  at fileMapValues.map.token (/Users/mriska/route-test/node_modules/ember-cli/lib/models/blueprint.js:633:50)
  at Array.map (native)
  at Class.generateFileMap (/Users/mriska/route-test/node_modules/ember-cli/lib/models/blueprint.js:633:37)
  at Promise.then.customLocals (/Users/mriska/route-test/node_modules/ember-cli/lib/models/blueprint.js:827:26)
  at tryCatch (/Users/mriska/route-test/node_modules/rsvp/dist/rsvp.js:539:12)
  at invokeCallback (/Users/mriska/route-test/node_modules/rsvp/dist/rsvp.js:554:13)
  at /Users/mriska/route-test/node_modules/rsvp/dist/rsvp.js:629:16
  at flush (/Users/mriska/route-test/node_modules/rsvp/dist/rsvp.js:2414:5)
  at _combinedTickCallback (internal/process/next_tick.js:73:7)
  at process._tickCallback (internal/process/next_tick.js:104:9)
@mriska
Copy link
Contributor Author

mriska commented Jun 30, 2017

In order to temporarily work around these issues you can make a change in the file:
node_modules/ember-source/blueprints/route/index.js

Change any instance of options.locals.moduleName to options.dasherizedModuleName and it should work.

@perlun
Copy link
Contributor

perlun commented Aug 1, 2017

I am seeing the exact same problem. Has anyone had the chance of investigating this further?

@alexphys
Copy link

alexphys commented Nov 9, 2017

Same here

$ ember -v
ember-cli: 2.16.2
node: 7.10.0
os: linux x64


$ ember g route foo/bar
installing route
Cannot read property 'moduleName' of undefined
TypeError: Cannot read property 'moduleName' of undefined
  at __name__ (.../node_modules/ember-source/blueprints/route/index.js:35:30)
  at fileMapValues.map.token (.../node_modules/ember-cli/lib/models/blueprint.js:633:50)
  at Array.map (native)
  at Class.generateFileMap (.../node_modules/ember-cli/lib/models/blueprint.js:633:37)
  at Promise.then.customLocals (.../node_modules/ember-cli/lib/models/blueprint.js:827:26)
  at tryCatch (.../node_modules/rsvp/dist/rsvp.js:525:12)
  at invokeCallback (.../node_modules/rsvp/dist/rsvp.js:538:13)
  at .../node_modules/rsvp/dist/rsvp.js:606:14
  at flush (.../node_modules/rsvp/dist/rsvp.js:2400:5)
  at _combinedTickCallback (internal/process/next_tick.js:73:7)
  at process._tickCallback (internal/process/next_tick.js:104:9)

@1c7
Copy link

1c7 commented Apr 6, 2018

Same here

image

mriska added a commit to mriska/ember-cli-coffeescript that referenced this issue Apr 26, 2018
@mriska mriska linked a pull request Apr 26, 2018 that will close this issue
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.

4 participants