3

I have cloned my ember project, use following commands

npm install
bower install

ember build

and got this message

DEPRECATION: Brocfile.js has been deprecated in favor of ember-cli-build.js. Ple ase see the transition guide: https://github.com/ember-cli/ember-cli/blob/master /TRANSITION.md#user-content-brocfile-transition. The loader.js addon is missing from your project, please add it to package.json.

I have searched about this exception and tried to install loader.js manually, but after this another got another exception :

can't find module rsvp

It seems there is some global problem in my project, I can't determine what is it.

And about deprecation - brocfile.js, I haven't changed it, should I?

Nininea
  • 2,671
  • 6
  • 31
  • 57

1 Answers1

4

The global installed ember-cli is just a simple shim that calls the ember-cli version of the project.

It looks like your have an really old version of ember and ember-cli in your project. I would recommend to update this, and follow the transition guides.

For this follow the guide here. At the moment the current ember-cli version is 2.3.0.

After ember init you have clean bower.json and package.json for your project. I personally like to replace all files and later use a git diff to get my custom code into the fresh files.

For this brocfile thing, just follow the guide! If you have no customizations in your brocfile you can just delete your brocfile and use the fresh ember-cli-build.js. If you have customizations you have to move them to the ember-cli-build.js into the default export function.

Lux
  • 17,835
  • 5
  • 43
  • 73
  • So, I should remove package.json and bower.js files and recreate them later? – Nininea Feb 25 '16 at 10:15
  • No. Follow the Guide. `ember init` will ask you to replace them and offer a diff. There you need to merge your customizations into the new blueprint. – Lux Feb 25 '16 at 10:20
  • Ah, understand what you mean. thanks. I am following upgrading tutorial but 'rm' commnad is not recognized, any ides? – Nininea Feb 25 '16 at 10:28
  • You are not on unix right? Use the powershell on windows. Or just delete the folders. `rm` is remove dir. – Lux Feb 25 '16 at 10:32
  • Uhu, I have updated and gotting some exceptions :/ for example Assertion Failed: Using `{{view}}` or any path based on it ('scripts/templates/currency-text.hbs' @ L1:C0) has been removed in Ember 2.0 – Nininea Feb 25 '16 at 11:14
  • You did a long jump. Check the ember 2.0 changelog. Maybe just jump to Ember 1.13 first and then upgrade to 2.0 in a second step. – Lux Feb 25 '16 at 12:33