Hello
I'm always getting the same message when trying to run my index.html file that attempts to reload jQuery from requireJS.
/TestRequire/jquery.js net :: ERR_FILE_NOT_FOUND Error: Script error for "jquery" link
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
- TestRequire
- components
- jquery
- dist
- jquery.js
- .bowerrc
- app.js
- bower.json
- index.html
- require.js (library require)
Does anyone have any ideas?