Grunt构建到nginx会导致错误(angularJS)

Grunt构建到nginx会导致错误(angularJS),angularjs,nginx,gruntjs,yeoman-generator-angular,Angularjs,Nginx,Gruntjs,Yeoman Generator Angular,我有一个简单的AngularJS应用程序,我使用grunt-service构建代码并对其进行测试。现在,我希望使用nginx将代码部署到服务器上,我正在使用grunt build任务执行此任务,该任务在/dist文件夹中生成代码。现在,我希望将此代码传输到可以承载它的服务器 我不知道这个错误是否与缩小代码有关,但应用程序没有运行 错误是: Error: [$injector:unpr] Unknown provider: aProvider <- a http://errors.a

我有一个简单的
AngularJS
应用程序,我使用
grunt-service
构建代码并对其进行测试。现在,我希望使用
nginx
将代码部署到服务器上,我正在使用
grunt build
任务执行此任务,该任务在
/dist
文件夹中生成代码。现在,我希望将此代码传输到可以承载它的服务器

我不知道这个错误是否与缩小代码有关,但应用程序没有运行

错误是:

    Error: [$injector:unpr] Unknown provider: aProvider <- a
http://errors.angularjs.org/1.2.6/$injector/unpr?p0=aProvider%20%3C-%20a
    at http://localhost/kds/scripts/ded94bd9.vendor.js:3:30474
    at http://localhost/kds/scripts/ded94bd9.vendor.js:4:13890
    at Object.c [as get] (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13194)
    at http://localhost/kds/scripts/ded94bd9.vendor.js:4:13985
    at c (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13194)
    at d (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13440)
    at Object.e [as instantiate] (http://localhost/kds/scripts/ded94bd9.vendor.js:4:13587)
    at http://localhost/kds/scripts/ded94bd9.vendor.js:4:29734
    at http://localhost/kds/scripts/ded94bd9.vendor.js:4:22719
    at f (http://localhost/kds/scripts/ded94bd9.vendor.js:3:30909) 

并且
grunt-serve
可以毫无问题地加载应用程序。

当您在AngularJS中看到错误时,例如“未知提供者:提供者好吧,现在,我还有比这更基本的问题。我已经禁用了构建中的所有缩小步骤,但仍然出现了一些错误,如加载资源失败:服务器响应状态为404(未找到)http://localhost/kds/styles/main.css,这同样适用于
main.js
和任何javascript文件。这与缩小错误无关!听起来你的nginx路径配置中有错误。我不这么认为,检查我的
dist
文件夹,我实际上没有看到这些文件。
    location /kds/ {
            alias /Users/asheshambasta/code/kds/dist/;
            index  index.html index.htm;
    }
// This injects $scope and $http as the two arguments to the controller.
myApp.controller("MyCtrl", ["$scope", "$http", function($scope, $http) { ... }]);