I am currently using a MEAN stack environment and encountered an issue while attempting to integrate a third-party extension into AngularJS material.
Our main view is based on a PUG template where we define all dependencies. Within it, I have included the following lines:
script(type="text/javascript" src="scripts/ng-material-datetimepicker/dist/angular-material-datetimepicker.min.js")
script(type="text/javascript" src="scripts/ng-material-datetimepicker/dist/angular-material-datetimepicker.min.js.map")
link(rel="stylesheet" href="scripts/ng-material-datetimepicker/dist/material-datetimepicker.min.css")
The scripts
part of the source is directed to our node-modules folder by this directive:
app.use('/scripts', express.static(path.join(__dirname, "./node_modules")));
Despite this configuration, I am encountering an error specifically related to the .map.js file (all other components appear to be working) in the browser's console:
Uncaught SyntaxError: Unexpected token :
While I've come across suggestions about incorrect MIME types or Chrome-related issues, I suspect that there may be a mistake in my setup. Can anyone pinpoint what might be going wrong?