【发布时间】:2019-08-29 03:11:35
【问题描述】:
我想运行一个由 Angular 1.5 编写的项目,我知道这是 gulp 的午餐。首先我使用npm install 安装所有依赖项,然后使用gulp 运行它。但失败了。它给了我800个问题。他们中的大多数看起来像:
226:7 error You should not set properties on $scope in controllers. Use controllerAs syntax and add data to "this" angular/controller-as
292:26 error "$" is not defined
334:19 warning You should use angular.element instead of the jQuery $ object
18:11 error You should not set properties on $scope in controllers. Use controllerAs syntax and add data to "this" angular/controller-as
但代码在其他计算机上运行良好。所以我想这不是代码的问题。我一定错过了什么。只想运行它。请帮助我,任何信息都会有所帮助。
我还创建了另外一件事,当我使用 npm install 安装依赖项时,它给了我一些错误,所以它没有安装所有依赖项。错误是这样的:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/jzhu321/Desktop/PwC/Projects/TeamTrack_Project/TeamTrack_Angular/node_modules/utf-8-validate/build'
gyp ERR! System Darwin 18.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxxx/Desktop/xx/Projects/xxxx_Project/xxxx_Angular/node_modules/utf-8-validate
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
我已经厌倦了某种方法来修复它(chomd 777 directName..)但是。不工作。
【问题讨论】:
标签: javascript node.js gulp node-gyp angular1.6