ember-table icon indicating copy to clipboard operation
ember-table copied to clipboard

Upgrading to 3.0.0 from 2.2.3 fails with ember-cli-sass error

Open jeffsawatzky opened this issue 4 years ago • 4 comments
trafficstars

I upgraded ember-table, and now when I run ember build I get the following error:

Could not find the default SASS implementation. Run the default blueprint:
   ember g ember-cli-sass
Or install an implementation such as "node-sass" and add an implementation option. For example:
   sassOptions: {implementation: require("node-sass")}

I don't use sass in my app, just plain css (with some stage 1 stuff using postcss and postcss-preset-env). This error didn't happen with 2.2.3, so I have pinned that for now. Do I need to install/configure ember-cli-sass even though my app doesn't use it?

Repo steps:

ember new myapp --yarn
cd myapp
ember install ember-table
ember build

jeffsawatzky avatar Apr 09 '21 17:04 jeffsawatzky

@jeffsawatzky interesting- ember-table used SASS and continues to use it in 3.x, however we are using a newer version of ember-cli-sass than previously.

ember-cli-sass stopped defaulting to a single version of SASS and now allows you pick a version. ember-table does not hard-code an option, the two would be sass and node-sass. They can differ significantly, though ember-table should be compatible with both, so it could be a reasonable decision to defer this to the consuming app (which may have a preference).

ember g ember-cli-sass merely installs the sass dependency: https://github.com/adopted-ember-addons/ember-cli-sass/blob/master/blueprints/ember-cli-sass/index.js#L6

My analysis:

  • Short-term, yes you should install a sass option. I don't think anyone realized that was a requirement now.
  • We should update the docs to spell this out if it is a requirement.
  • We are already starting to consider a 4.0 for later this year, and I wonder if the long-term plan to simply drop SASS from the addon should fit into that timeline. Practically I don't see Addepar prioritizing the work until later summer at the absolute earliest, but I would support anyone who wanted to start on the effort.

mixonic avatar Apr 09 '21 18:04 mixonic

FWIW here is how to install node-sass:

npm install --save-dev node-sass, then in ember-cli-build.js file:

const nodeSass = require('node-sass');

const app = new EmberApp({
  sassOptions: {
    implementation: nodeSass
  }
});

patrickberkeley avatar Apr 10 '21 16:04 patrickberkeley

can there be an option to not use sass, and use pre-built styles? I/we/many are trying very hard to avoid sass

NullVoxPopuli avatar May 19 '21 20:05 NullVoxPopuli

I updated an ember project to [email protected] and successfully removed this shim.

migration guide

  • remove node-sass from your ember project's devDependencies in package.json
  • removed snippet from your ember-cli-build.js
  • update your lockfile

ghost avatar Jun 29 '22 13:06 ghost