requirejs - not loading certainly with proper path given

主宰稳场 提交于 2019-12-08 14:28:06

问题


I am using 'requirejs' for my app development, it was worked properly but certainly it is not working now. all the path are correct. but i am getting error on load the page

error i am getting:

Remote Address:127.0.0.1:3000
Request URL:http://localhost:3000/js/lib/require.js //but exactly the file is here.
Request Method:GET
Status Code:404 Not Found

here is my html for jade:

doctype html
html(lang='en')
    head
        title= name
        link(rel='stylesheet', href='styles/bootstrap.min.css')
        link(rel='stylesheet', href='styles/stylesheet/style.css')

    body

        <h1>I am basic testing</h1> 
        script(data-main="js/main", src="js/lib/require.js")

here is my main.js

requirejs.config({
    baseUrl:'js/',
    paths:{
        "jQuery":'lib/jquery',
        "underscore":"lib/underscore",
        "backbone":"lib/backbone",
        "marionette":"lib/Marionette"
    },
    "shim":{
        "jQuery":{
            exports:"$"
        },
        "underscore":{
            exports:"_"
        },
        "backbone":{
            exports:"Backbone",
            deps:["underscore"]
        },
        "marionette":{
            exports:"Marionette",
            deps:["backbone"]
        }
    }
});

requirejs(['app'], function(app){});

Any one help me to fix this issue?

screen shot from browser:

来源:https://stackoverflow.com/questions/23624190/requirejs-not-loading-certainly-with-proper-path-given

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!