I have the following structure for "app" and "test", generally following Yeoman's layout:
app/
---js/(application files)
---css/
---img/
---lib/
---angular/(all angular*.js files)
---partials/
test/
---unit/
---main-test.js
My main-test.js is:
require({
baseUrl:'/base/app/js',
paths:{
'angular' : '../lib/angular/angular',
//'angular' : '../vendor/angular/angular',
'resource' : '../lib/angular/angular-resource',
//'resource' : '../vendor/angular/angular-resource',
'mocks' : '../../test/lib/angular/angular-mocks'
},
shim:{
'angular' : { 'exports' : 'angular' },
'resource' : { deps : ['angular'] },
'mocks': { deps : ['angular'], 'exports' : 'mocks'}
}
I am simply trying to make a new dir, "vendor", at the same level as "app/lib", and serve angularjs files from there, after the appropriate edits for the new path in main-test.js. When I do this, I get the following error:
Error: Module could not be loaded: angular
I cannot figure out why just changing the location of the angularjs files would cause this error.