即时通讯设法创建一个应用程序与角2,我使用videogular 2,我安装视频2与npm和我检查我的node_modules和videogular2目录中存在,但当我运行我的应用程序发生错误:videogular 2 for angular 2 404错误
angular2-polyfills.js:126 GET http://localhost:3000/node_modules/videogular2/core 404(未找到)
angular2-polyfills.js:390错误:错误:XHR错误(404未找到)装载
,这是我的配置:
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
},
map: {
'videogular2': './node_modules/videogular2'
}
});
System.import('app/main')
.then(null, console.error.bind(console));
@ThierryTemplier为什么需要以这种方式添加node_modules? –