unionups / ember-cli-bootstrap-sass

Include bootstrap-sass and bootstrap-for-ember into an ember-cli app
19 stars 12 forks source link

Does not seem to be working with Ember CLI 0.2.0 #13

Open ZenCocoon opened 9 years ago

ZenCocoon commented 9 years ago

On a new project, I just added broccoli-sass and ember-cli-bootstrap-sass

error while running ember s:

$ ember s
The package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).
version: 0.2.0
The package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).
Livereload server on port 35729
Serving on http://localhost:4200/
{
  "status": 1,
  "file": "/Users/seb/code/training/ember/test-bootstrap-sass/tmp/tree_merger-tmp_dest_dir-grls1nY9.tmp/app/styles/app.scss",
  "line": 1,
  "column": 9,
  "message": "file to import not found or unreadable: bootstrap\nCurrent dir: /Users/seb/code/training/ember/test-bootstrap-sass/tmp/tree_merger-tmp_dest_dir-grls1nY9.tmp/app/styles/"
} [string exception]
Error: {
  "status": 1,
  "file": "/Users/seb/code/training/ember/test-bootstrap-sass/tmp/tree_merger-tmp_dest_dir-grls1nY9.tmp/app/styles/app.scss",
  "line": 1,
  "column": 9,
  "message": "file to import not found or unreadable: bootstrap\nCurrent dir: /Users/seb/code/training/ember/test-bootstrap-sass/tmp/tree_merger-tmp_dest_dir-grls1nY9.tmp/app/styles/"
} [string exception]
    at /Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-cli/node_modules/broccoli/lib/builder.js:35:15
    at lib$rsvp$$internal$$tryCatch (/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:489:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:501:17)
    at lib$rsvp$$internal$$publish (/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:472:11)
    at lib$rsvp$$internal$$publishRejection (/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:415:7)
    at lib$rsvp$asap$$flush (/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1290:9)
    at process._tickCallback (node.js:355:11)

package.js

{
  "name": "test-bootstrap-sass",
  "version": "0.0.0",
  "description": "Small description for test-bootstrap-sass goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "start": "ember server",
    "build": "ember build",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.0.0",
    "broccoli-sass": "^0.4.0",
    "ember-cli": "0.2.0",
    "ember-cli-app-version": "0.3.2",
    "ember-cli-babel": "^4.0.0",
    "ember-cli-bootstrap-sass": "^0.2.11",
    "ember-cli-content-security-policy": "0.3.0",
    "ember-cli-dependency-checker": "0.0.8",
    "ember-cli-htmlbars": "0.7.4",
    "ember-cli-ic-ajax": "0.1.1",
    "ember-cli-inject-live-reload": "^1.3.0",
    "ember-cli-qunit": "0.3.9",
    "ember-cli-uglify": "1.0.1",
    "ember-data": "1.0.0-beta.15",
    "ember-export-application-global": "^1.0.2"
  }
}
ZenCocoon commented 9 years ago

I've tried to remove broccoli-sass and user ember-cli-sass instead and get the following errors:

$ ember s
The package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).
version: 0.2.0
The package `ember-data` is not a properly formatted package, we have used a fallback lookup to resolve it at `/Users/seb/code/training/ember/test-bootstrap-sass/node_modules/ember-data`. This is generally caused by an addon not having a `main` entry point (or `index.js`).
Livereload server on port 35729
Serving on http://localhost:4200/
File: /Users/seb/code/training/ember/test-bootstrap-sass/tmp/tree_merger-tmp_dest_dir-lgvA3X82.tmp/app/styles/app.scss (1)
file to import not found or unreadable: bootstrap
Current dir: /Users/seb/code/training/ember/test-bootstrap-sass/tmp/tree_merger-tmp_dest_dir-lgvA3X82.tmp/app/styles/
ZenCocoon commented 9 years ago

This sample app can be found at https://github.com/ZenCocoon/test-bootstrap-sass

ZenCocoon commented 9 years ago

I ended up finding a solution with https://github.com/ZenCocoon/test-bootstrap-sass/commit/5f1707559c04e2ad768897aecb438b0135ac8f6b but that looks really unfriendly.

Any clue how to make this better?

jozefvaclavik commented 9 years ago

:+1: same problem here.. Setting up ENV.sassOptions helped, but it feels dirty :-1:

daltonamitchell commented 9 years ago

I'm having the same issue but I can seem to get the temp fix to work. Did you change anything in your Brocfile or anywhere else? This is my environment.js:

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'connect-app',
    environment: environment,
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    // config/environment.js
    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
    }
  };

  /**
   * Temporary fix for errors after updating cli to v0.2.x. This should be fixed
   * in the future.
   */
  ENV.sassOptions = {
    includePaths: [
      'node_modules/ember-cli-bootstrap-sass/vendor/bootstrap-sass-official/assets/stylesheets/'
    ]
  };
cameronlinden commented 9 years ago

bump

carrotcomputer commented 9 years ago

@daltonamitchell @ZenCocoon @cameronlinden I've had the same issue as you guys. After scouring the internet for solutions, my conclusion was that this repo looks kinda dead. No updates or issue comments for 4 months or so

By removing ember-cli-bootstrap-sass from my project all-together and installing the forked and currently maintained ember-cli-bootstrap-sassy (https://github.com/lifegadget/ember-cli-bootstrap-sassy) and using an older brocolii-sass (0.3.3) due to an error in the current node-sass that prevents compilation (https://github.com/twbs/bootstrap-sass/issues/879), I got this to run.

Hope this helps!

matthewconstantine commented 9 years ago

I think core the reason this is failing is because ember-cli-sass doesn't include this.app.options.sassOptions the way it used to (despite what the docs say). This plugin relies on that functionality. More info here.