RequireJS can not find a JavaScript module

I have an index.html file which specifies the location of a main.js to RequireJS. I have a pure client side site and I am trying to require other RequireJS modules from the server. The code worked last week, all of sudden I started getting this error without changing the code.

Here’s the HTML code. In the tag, I am specifying the path to find the main.js to RequireJS:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Doc View</title>
        <link rel="stylesheet" href="assets/lib/bootstrap/dist/css/bootstrap.min.css" />
        <link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css" />
        <link rel="stylesheet" href="assets/css/app.css" />
        <script data-main="views/main.js" src="assets/lib/requirejs/require.js">
        </script>
        <base href="/viva_med_web_local_version/">
    </head>
    <body>
        <div class="ng-cloak">
            <div ui-view="header"></div>
            <div ui-view="content"></div>
            <div ui-view="footer"></div>
        </div>
    </body>
</html>

I have main.js in my views. My project structure look like this:

enter image description here

I have no idea why I am getting this error as the path to main.js is given in the index.html. I am getting this error:

Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:138 Uncaught Error: Script error for: main
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:163)
    at HTMLScriptElement.onScriptError (require.js:1666)

Here’s the main.js file:

requirejs.config({

    waitSeconds: 1200,

    paths: {
        underscore: 'assets/lib/underscore/underscore',
        angular: 'assets/lib/angular/angular',
        'angular-cookies': 'assets/lib/angular-cookies/angular-cookies.min',
        'amcharts': 'assets/lib/amcharts_3.21.2/amcharts/amcharts',
        'amcharts-serial': 'assets/lib/amcharts_3.21.2/amcharts/serial',
        'amcharts-angular': 'assets/lib/amcharts-angular/dist/amChartsDirective',
        'angular-route': 'assets/lib/angular-route/angular-route',
        'angular-ui-route': 'assets/lib/angular-ui-router/release/angular-ui-router',
        'ui.bootstrap': 'assets/lib/angular-bootstrap/ui-bootstrap-tpls',
        'bootstrap': 'assets/lib/bootstrap/dist/js/bootstrap.min',
        'jquery': 'assets/lib/jquery/dist/jquery'
        // more configuration
    },

    shim: {
        underscore: {
            exports: '_'
        },
        'angular': {
            exports: 'angular'
        },
        'angular-ui-route': {
            deps: ['angular']
        },
        'amcharts-serial': {
            deps: ['amcharts']
        },
        'amcharts-angular': {
            deps: ['angular', 'amcharts', 'amcharts-serial']
        },
        'ui.bootstrap': {
            deps: ['angular']
        },
        'states': {
            deps: ['angular'],
            exports: 'states'
        },
        'angular-route': {
            deps: ['angular']
        },
        'bootstrap': {
            deps: ['jquery']
        },
        'angular-cookies': {
            deps: ['angular']
        }
    },
    priority: [
        'angular'
    ],
    dir: "."
});

requirejs(['angular',
    'angular-cookies',
    'app',
    'underscore',
    'js/routes',
    'bootstrap',
    'jquery',
    'amcharts',
    'amcharts-serial',
    'amcharts-angular',
    'ui.bootstrap'
], function (angular, app) {
    angular.element(document).ready(function () {
        angular.bootstrap(document, ['App']);
        document.getElementsByTagName('html')[0].dataset.ngApp = 'App';
    });
});

Can someone help me? There is nothing wrong with main.js – My teammate has the same main.js and it is working for him. I tried copying his main.js, but it does not work either. I tried clearing the cache and also restarting WebStorm. It’s still not working.

Source: AngularJS