Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The loader.js addon is missing

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?

like image 837
Nininea Avatar asked Dec 22 '25 03:12

Nininea


1 Answers

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.

like image 170
Lux Avatar answered Dec 24 '25 11:12

Lux