我曾在Angular2 CLI项目中工作过,我已经安装了来自here的mydatepicker包,它完全可以完美运行但是当我为init应用程序运行ng serve
命令时,它会抛出一次错误,然后应用程序运行,因为它是完美的所以我错过了什么或包装错误?
ERROR in multi script-loader!./src/assets/js/modernizr.js script-loader!./~/jquery/dist/jquery.min.js script-loader!./~/bootstrap/dist/js/bootstrap.min.js script-loader!./~/jquery-migrate/dist/jquery-migrate.min.js script-loader!./src/assets/js/plugins.js script-loader!./src/mydatepicker/bundles/mydatepicker.umd.js
Module not found: Error: Can't resolve 'E:\Project\PROFILE\src\mydatepicker\bundles\mydatepicker.umd.js' in 'E:\Project\PROFILE'
@ multi script-loader!./src/assets/js/modernizr.js script-loader!./~/jquery/dist/jquery.min.js script-loader!./~/bootstrap/dist/js/bootstrap.min.js script-loader!./~/jquery-migrate/dist/jquery-migrate.min.js script-loader!./src/assets/js/plugins.js script-loader!./src/mydatepicker/bundles/mydatepicker.umd.js
答案 0 :(得分:1)
"scripts": [
"../node_modules/bootstrap/node_modules/jquery/dist/jquery.js",
"../node_modules/bootstrap/node_modules/tether/dist/js/tether.js",
"../node_modules/bootstrap/dist/js/bootstrap.js"
]
你在 angular-cli.json 文件中添加了这个吗?