Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialToni Caktas
16,957 PointsI am geting this when i run my app with web pack:
vendor.bundle.js:13665 Error: [$injector:unpr] Unknown provider: dataServiceProvider <- dataService <- mainCtrl http://errors.angularjs.org/1.5.5/$injector/unpr?p0=dataServiceProvider%20%3C-%20dataService%20%3C-%20mainCtrl at vendor.bundle.js:183 at vendor.bundle.js:4573 at Object.getService [as get] (vendor.bundle.js:4726) at vendor.bundle.js:4578 at getService (vendor.bundle.js:4726) at injectionArgs (vendor.bundle.js:4750) at Object.invoke (vendor.bundle.js:4772) at $controllerInit (vendor.bundle.js:10230) at nodeLinkFn (vendor.bundle.js:9148) at compositeLinkFn (vendor.bundle.js:8512)(anonymous function) @ vendor.bundle.js:13665(anonymous function) @ vendor.bundle.js:10340Scope.$apply @ vendor.bundle.js:17449bootstrapApply @ vendor.bundle.js:1864invoke @ vendor.bundle.js:4780doBootstrap @ vendor.bundle.js:1862bootstrap @ vendor.bundle.js:1882angularInit @ vendor.bundle.js:1767(anonymous function) @ vendor.bundle.js:30978trigger @ vendor.bundle.js:3281defaultHandlerWrapper @ vendor.bundle.js:3571eventHandler @ vendor.bundle.js:3559
1 Answer
Ronald Hunter
17,474 Pointsyou must require you directives and services into the app.js in your scripts folder. when you look at the output of webpack you can see that you don't have the services in the code, so its telling you that the code you referenced or are trying to use does not exist.
require('./scripts/controllers/main.js');
require('./scripts/controllers/todo.js');
require('./scripts/directives/todo.js');
require('./scripts/services/data.js');