4

我正在尝试安装此插件

所以我跑:

meteor create test

cd test

npm install haml-coffee-meteor

meteor

我得到以下信息:

$ meteor
[[[[[ ~/test ]]]]]

No dependency info in bundle. Filesystem monitoring disabled.
=> Errors prevented startup:
Exception while bundling application:
Error: Parse error - line 1, file /Users/xaxxon/test/node_modules/haml-coffee-meteor/spec/suites/templates/coffee/attributes.html
<div id='one'>
    at parseError (/Users/xaxxon/.meteor/packages/templating/88d1cd8ec8579600ff26b8a0ed7bf23295887674/html_scanner.js:23:14)
    at Object.html_scanner.scan (/Users/xaxxon/.meteor/packages/templating/88d1cd8ec8579600ff26b8a0ed7bf23295887674/html_scanner.js:36:15)
    at /Users/xaxxon/.meteor/packages/templating/88d1cd8ec8579600ff26b8a0ed7bf23295887674/package.js:44:32
    at _.extend.add_file (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/bundler.js:213:7)
    at self.api.add_files (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/bundler.js:126:16)
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/xaxxon/.meteor/tools/cc18dfef9e/lib/node_modules/underscore/underscore.js:78:11)
    at self.api.add_files (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/bundler.js:125:11)
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/xaxxon/.meteor/tools/cc18dfef9e/lib/node_modules/underscore/underscore.js:78:11)
    at Object.self.api.add_files (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/bundler.js:124:9)
    at _.extend.init_from_app_dir [as on_use_handler] (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/packages.js:246:11)
    at _.extend.use (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/bundler.js:464:11)
    at Object.exports.bundle (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/bundler.js:873:12)
    at /Users/xaxxon/.meteor/tools/cc18dfef9e/tools/run.js:697:26
    at exports.inFiber (/Users/xaxxon/.meteor/tools/cc18dfef9e/tools/fiber-helpers.js:24:12)

Please fix the problem and restart.

我真的不知道发生了什么,但如果我不安装 haml-coffee-meteor 包,它会按预期工作。我认为也许这个包试图改变 .html 文件的处理方式,并且这个单元测试期望传统的 html 是可解析的,但是现在系统期望 haml 并导致测试中断?但我什至不确定这是一个单元测试,所以我真的不知道如何进行。

4

2 回答 2

2

您可以使用Blade,它具有类似 haml/jade 的语法,并且可以从大气中轻松下载。

于 2013-07-08T02:32:29.560 回答
0

关于可以直接在 Meteor 中安装 NPM 包的位置,有一些变通方法。但现在的标准做法是使用Meteorite进行包装。不过,我还没有找到一个不会让我对 MEteor 感到头疼的 HTML 预处理器包,所以最好还是坚持使用把手。祝你好运!

于 2013-07-07T06:48:18.347 回答