I get this message when my gulp tslint task runs. I'm not sure how to add moment.js so that ng2-bootstrap is happy.
node_modules/ng2-bootstrap/components/datepicker/date-formatter.ts(1,25): error TS2307: Cannot find module 'moment'.
Here is my project on GitHub. It should work with Visual Studio 2015 with no additional configuration.
I updated my systemjs config as specified:
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
},
map: {
moment: '../lib/moment/min/moment.min.js'
}
});
System.import('app.js')
.then(null, console.error.bind(console));
I added this import to my components file. This is what generates the error.
import {BUTTON_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';
I'm loading this module with NPM.
"moment": "^2.11.2",
I'm copying all the library files to wwwroot within my gulp file. Maybe I need to copy over more files? I don't know.