Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.2 introduced a breaking change (Heimdall dependency) #227

Closed
1 of 3 tasks
james-nash opened this issue Mar 25, 2019 · 1 comment
Closed
1 of 3 tasks

2.2.2 introduced a breaking change (Heimdall dependency) #227

james-nash opened this issue Mar 25, 2019 · 1 comment

Comments

@james-nash
Copy link

Package
This issue is related to the following monorepo package(s):

  • eyeglass
  • broccoli-eyeglass
  • ember-cli-eyeglass

Description
Upgrading from 2.2.1 to 2.2.2 (or 2.3.0) breaks my projects' builds. It looks like Eyeglass now depends on heimdalljs, but since it's not declared in Eyeglass's dependencies downstream projects don't have it available.

module.js:550
    throw err;
    ^

Error: Cannot find module 'heimdalljs'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/ja310147/tmp/gravity-test/node_modules/eyeglass/lib/modules/EyeglassModules.js:25:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

To Reproduce
Steps to reproduce the behavior:

  1. Setup a project that compiles SASS code using Eyeglass (v2.2.2 or higher)
  2. Run the build
  3. See error!

Expected behavior
The build should run without errors (as it does for v2.2.1)

Screenshots/Code Examples/Terminal Commands
I first noticed this on one of our projects: Gravity. We use Gulp for our builds and that in turn uses Node SASS together with Eyeglass. Our Greenkeeper bot tried upgrading our Eyeglass dependency and spotted the error (see bug).

Since there's a lot going on in our Gulp build, I tried using a simpler setup and can confirm that using Eyeglass 2.2.1 works fine, but 2.2.2 (and up) breaks.

Here's my simple Gulp file that reproduces the issue (it simply tries to compile our Gravity SASS lib, which itself depends on some other SASS libs and therefore requires Eyeglass to compile properly:

// gulpfile.js

const path = require('path');
const gulp = require('gulp');
const sass = require('gulp-sass');
const eyeglass = require('eyeglass');
const gravityPaths = require('@buildit/gravity-ui-sass');

// This project's build output dir
const buildDir = path.resolve(__dirname, 'public');

function compileGravitySass() {
  return gulp.src( gravityPaths.srcSassFilePath )
    .pipe(sass(eyeglass({})))
    .pipe(gulp.dest( buildDir ));
}

module.exports = {
  default: compileGravitySass
};

Environment:

  • OS: macOS Sierra 10.12.6
  • Node version: v8.15.1
  • Related Software and Version(s):
    • Gulp 4.0.0
    • Gulp-SASS 4.0.2
@james-nash
Copy link
Author

Awesome. Thanks for fixing that! 👍

I can confirm that the latest versions of Eyeglass are working for us now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant