流星应用程序没有推送到Heroku错误

时间:2015-05-20 17:48:31

标签: heroku meteor sass bourbon

我构建了一个使用波旁scss库的Meteor应用程序。我试图将我的应用程序推送到heroku时遇到以下错误:

    Errors prevented bundling:
    While building the application:
    client/styles/bullets.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/bullets.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/comments.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/main.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/hero.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/hero.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/home.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/home.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/hover.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/main.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/navigation.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/main.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/registration.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/registration.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
    client/styles/main.scss: Scss compiler error: undefined
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/main.scss:1:
    file to import not found or unreadable: "bourbon/bourbon"
    Current dir:
    /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/
     !     Push rejected, failed to compile Node.js app

显然,它无法找到scss文件,尽管它们位于我的client / styles文件夹中。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,最后删除了流星 - 波本威士忌,流星陨石和流星苦涩包,并通过凉亭加入了它们。

添加此bower meteor包:mquandalle:bower

Bower init获取你的bower.json(我只是将它放在目录的根目录中)并添加你的波旁威士忌/整洁/苦味依赖。不要打包安装它们,因为流星会自动进行安装。如果你这样做,只需删除bower_components文件夹。

bower.json的底部:

"dependencies": { "bourbon": "4.2.1", "neat": "1.7.2", "bitters": "1.0.0" }

然后从/.meteor/local/中的位置导入文件。例如,在我的main.scss我有:

@import "./.meteor/local/bower/bourbon/app/assets/stylesheets/bourbon"; @import "./.meteor/local/bower/neat/app/assets/stylesheets/neat"; @import "./.meteor/local/bower/bitters/app/assets/stylesheets/base";

然后我能够成功推送到heroku ...我希望它也适合你!