ember-cli-scaffold icon indicating copy to clipboard operation
ember-cli-scaffold copied to clipboard

Error in faker.js: name.toLowerCase is not a function

Open jgamedev opened this issue 8 years ago • 3 comments

I'm using ember cli 2.5.0 After creating a brand new Ember project and issuing a simple scaffolding command such as:

ember generate scaffold foobar:string age:number

I get the following error:

File: app2/bower_components/Faker/build/build/faker.js The Broccoli Plugin: [Babel] failed with: TypeError: app2/bower_components/Faker/build/build/faker.js: name.toLowerCase is not a function at check (/home/joao/ember_projects/app2/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/transformers/validation/react.js:20:22) at NodePath.CallExpression (/home/joao/ember_projects/app2/node_modules/ember-cli-babel/node_modules/broccoli-babel-transpiler/node_modules/babel-core/lib/transformation/transformers/validation/react.js:40:7)

jgamedev avatar Jun 02 '16 02:06 jgamedev

After further investigation it seems that this is causing for some commands (ember new, ember install) trying to install bower components inside of the ember /app folder, even when such folder is not mentioned in the .bowerrc file

Deleting such folder and calling bower install directly seems to solve this issue.

jgamedev avatar Jun 02 '16 18:06 jgamedev

I'm unable to reproduce this issue in a fresh new app. This might be related with some custom setup in your app.

marcioj avatar Jun 03 '16 15:06 marcioj

Thanks for trying, as I said it should only happen if you have a bower_components folder inside your app, not sure what is causing ember to create this folder for me

jgamedev avatar Jun 03 '16 18:06 jgamedev