在我的代码中,以下命令在powershell提示符上执行
r.js -o name=main out=main_opt.js baseUrl=.
工作正常并输出以下内容
Tracing dependencies for: main
Uglifying file: C:/Users/Scott/Documents/d/proj/Scripts/Coffee/Directory/main_opt.js
C:/Users/Scott/Documents/d/proj/Scripts/Coffee/Directory/main_opt.js
----------------
C:/Users/Scott/Documents/d/proj/Scripts/Coffee/Directory/DirectoryVM.js
C:/Users/Scott/Documents/d/proj/Scripts/Coffee/Directory/main.js
通过msbuild我得到以下
RequireJSOptimize:
working dir = C:\Users\Scott\Documents\d\proj\Scripts\Coffee\Directory\
r.js -o name=main out=main_opt.js baseUrl=.
node.js:203
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Error evaluating module "undefined" at location "undefined":
TypeError: Cannot call method 'write' of null
fileName:undefined
lineNumber: undefined
http://requirejs.org/docs/errors.html#defineerror
at makeError (C:\Users\Scott\Documents\d\GitHub\node\lib\node_modules\requirejs\bin\r.js:179:17)
at execManager
....
(C:\Users\Scott\Documents\d\GitHub\node\lib\node_modules\requirejs\bin\r.js:598:17)
有什么想法吗?
答案 0 :(得分:1)
这是v 0.5.9节点的错误。自固定以来。