seajs/spm — Issue #105: build error
Author: zicjin
Created: 2012-02-09 02:13:46+00:00
State: open

PS E:\Fundtrade\dev\FundTrade.web\js\page> spm build aaa.js --combine
Building E:\Fundtrade\dev\FundTrade.web\js\page\aaa.js

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error
at new JS_Parse_Error (C:\Program Files (x86)\nodejs\node_modules\spm\node_modules\uglify-js\lib\parse-js.js:260:22)

at js_error (C:\Program Files (x86)\nodejs\node_modules\spm\node_modules\uglify-js\lib\parse-js.js:268:15)
at parse_error (C:\Program Files (x86)\nodejs\node_modules\spm\node_modules\uglify-js\lib\parse-js.js:360:17)
at Object.next_token [as input] (C:\Program Files (x86)\nodejs\node_modules\spm\node_modules\uglify-js\lib\parse-js.
js:602:17)
at next (C:\Program Files (x86)\nodejs\node_modules\spm\node_modules\uglify-js\lib\parse-js.js:706:37)
at Object.parse (C:\Program Files (x86)\nodejs\node_modules\spm\node_modules\uglify-js\lib\parse-js.js:692:19)
at getAst (C:\Program Files (x86)\nodejs\node_modules\spm\lib\utils\dependences.js:109:20)
at Object.parse (C:\Program Files (x86)\nodejs\node_modules\spm\lib\utils\dependences.js:16:13)
at getAllDependenciesFiles (C:\Program Files (x86)\nodejs\node_modules\spm\lib\utils\combo.js:85:26)
at Object.compile (C:\Program Files (x86)\nodejs\node_modules\spm\lib\utils\combo.js:36:15)

aaa.js ------------------------------------------------------------------------------------------------------
﻿seajs.use('init', function(init) {
alert(22);
});

#注意每行左侧有两个额外的空格。把这些空格去掉后就OK了。