The Asset "" To Be Published Does Not Exist Error While Registering The Js File

Hi,

I would like to include a js file inside my module('modules/emp/assets') and published it at

protected/components/Controller.php.




private $_assetsBase;

	

	public function getAssetsBase()

	{

		if ($this->_assetsBase === null) {

			$this->_assetsBase = Yii::app()->assetManager->publish(

					Yii::getPathOfAlias('application.assets'),

					false,

					-1,

					YII_DEBUG

			);

		}

		return $this->_assetsBase;

	}



While registering the js in the view its throwing error.


Yii::app()->clientScript->registerCssFile(Yii::app()->controller->assetsBase.'/js/jquery.js')

echo Yii::app()->controller->assetsBase;

Error as "The asset "" to be published does not exist. "

I am also having the same issue.

The asset “/var/www/html/protected/extensions/EAjaxUpload/assets” to be published does not exist.

Can someone please help.