Search code examples
herokumeteorsassbourbon

Meteor application not pushing to Heroku error


I built a Meteor app that uses the bourbon scss library. I tried to push my app to heroku got the following error:

    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

Apparently, it's not able to find the scss files, although they are in my client/styles folder. Can someone help?


Solution

  • I was having the same problem and finally removed the meteor-bourbon, meteor-neat, and meteor-bitters packages and added them via bower instead.

    Add this bower meteor package: mquandalle:bower

    Bower init to get your bower.json (I just put it in the root of the directory) and add your bourbon/neat/bitters dependencies. DON'T bower install them as meteor automatically does it. If you did, just delete the bower_components folder.

    The bottom of my bower.json:

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

    Then import the files from their location in /.meteor/local/. For example, in my main.scss I have:

    @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";

    Then I was able to push to heroku successfully...I hope it works for you too!