我正在处理有关Node.js的教程:http://www.johnpapa.net/get-up-and-running-with-node-and-visual-studio/
我可以让应用程序运行 glup serve-dev --sync。 这很好用。我遇到的问题 gulp serve-build --sync 要么 gulp build 我收到这个错误:
有什么想法吗?
gulp build ==============================报道摘要=============== ================
报价:87.69%(235/268)
牧场:50%(20/40)
职业:84.62%(77/91)
06:06:25] Karma完成了
06:06:25]完成'测试' 5.45秒后
06:06:25]开始'优化' ...
06:06:25]优化js,css和html
06:06:27] gulp-injection 1个文件到index.html
:\项目\ MYAPP \ node_modules \一饮而尽-NG-注释\ node_modules \ NG-注释\建造\ ES5 \ NG-注释-main.js:330个
target。$ methodName = method.name;
^
ypeError:无法分配给只读属性' $ methodName'假的
at matchRegular(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ build \ es5 \ ng-annotate-main.js:330:24)
在匹配时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ build \ es5 \ ng-annotate-main.js:36:66)
at traverse.post(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ build \ es5 \ ng-annotate-main.js:995:23)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:50:13)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:41:25)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:41:25)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:41:25)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:44:21)
在访问时(F:\ Projects \ myapp \ node_modules \ gulp-ng-annotate \ node_modules \ ng-annotate \ node_modules \ ordered-ast-traverse \ ordered-ast-traverse.js:41:25)
...
答案 0 :(得分:14)
打开你的 package.json ,用“gulp-ng-annotate”替换“gulp-ng-annotate”:“~0.3.6”: “^ 0.5.2”。强>
运行“npm update”。