我試圖構建一個requirejs/backbone/handlebars項目,並且我似乎在嘗試運行app.build.js時遇到此錯誤:require-handlebars-plugin構建錯誤 - ReferenceError:_未定義
Tracing dependencies for: main
ReferenceError: _ is not defined
In module tree:
main
cs
hbs
underscore
ReferenceError: _ is not defined
In module tree:
main
cs
hbs
underscore
at Object.eval (eval at <anonymous> (/usr/local/share/npm/lib/node_modules/requirejs/bin/r.js:13718:64))
該應用程序完美地工作,沒有錯誤,當沒有建立。如果重要,該項目的骨幹和下劃線包含在requirejs墊片中。我會發布整個源代碼,但它是一個內部系統,所以我不能。如果需要更多信息,我可以發佈。
謝謝!
聽起來就像是沒有看到_.js – kennypu
@ kennypu是的它不能,但我不知道爲什麼 - 它在瀏覽器中運行時看到它。 –
骨幹需要Underscore,Underscore定義'_'。 –