2
Hello
I’m always getting the same message when trying to run my index.html file that tries to reload jQuery from requireJS.
/Testerequire/jquery.js net::ERR_FILE_NOT_FOUND Error: Script error for "jquery" http://requirejs.org/docs/errors.html#scripterror
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test</title>
<script data-main="app.js" src="require.js"></script>
</head>
<script>
require(["jquery"], function($) {
console.log($);
});
</script>
<body></body>
</html>
app js.
requirejs.config({
baseUrl: "components",
paths: {
"jquery": "jquery/dist/jquery",
"bootstrap": "bootstrap/dist/js/bootstrap"
},
shim: {
"bootstrap": {
deps: ["jquery"]
}
}
});
Directory structure
- Testerequire
- Components
- jquery
- dist
- jquery.js
- .bowerrc
- app js.
- Bower.json
- index.html
- require.js (require library)
Does anyone have any idea?