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

Crash when using lighten() function in a wrong way #286

Open
yorrd opened this issue Jan 13, 2019 · 4 comments
Open

Crash when using lighten() function in a wrong way #286

yorrd opened this issue Jan 13, 2019 · 4 comments
Labels
awaiting-feedback Waiting for feedback from the issue reporter

Comments

@yorrd
Copy link

yorrd commented Jan 13, 2019

When I use the lighten() method in any scss file like this, Meteor crashes with the error found below.

el {
 $color: 'aa1111';
 background-color: lighten($color, 2)
}

of course, it should be #aa1111; but I wouldn't expect Meteor to crash because of a typo ;) the same effect appears when using numbers > 100 as the second argument

meteor version: 1.8.1-beta.13

fourseven:scss version: 4.10

Please let me know if I can help you debug this further.

/home/yorrd/.meteor/packages/static-html/.1.2.2.1iiezyg.nj5k++os+web.browser+web.cordova/plugin.compileStaticHtmlBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^
undefined
 => awaited here:
    at Promise.await (/home/yorrd/.meteor/packages/static-html/.1.2.2.1iiezyg.nj5k++os+web.browser+web.cordova/plugin.compileStaticHtmlBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:39:12)
    at JsOutputResource.finalize (/tools/isobuild/compiler-plugin.js:897:7)
    at JsOutputResource.hasPendingErrors (/tools/isobuild/compiler-plugin.js:924:10)
    at JsOutputResource.reportPendingErrors (/tools/isobuild/compiler-plugin.js:929:14)
    at ImportScanner._scanFile (/tools/isobuild/import-scanner.js:849:14)
    at each (/tools/isobuild/import-scanner.js:907:14)
    at _.each._.forEach (/home/yorrd/.meteor/packages/meteor-tool/.1.8.1-beta.13.11369o3.fchv++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
    at ImportScanner._scanFile (/tools/isobuild/import-scanner.js:871:5)
    at each (/tools/isobuild/import-scanner.js:907:14)
    at _.each._.forEach (/home/yorrd/.meteor/packages/meteor-tool/.1.8.1-beta.13.11369o3.fchv++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
    at ImportScanner._scanFile (/tools/isobuild/import-scanner.js:871:5)
    at each (/tools/isobuild/import-scanner.js:907:14)
    at _.each._.forEach (/home/yorrd/.meteor/packages/meteor-tool/.1.8.1-beta.13.11369o3.fchv++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
    at ImportScanner._scanFile (/tools/isobuild/import-scanner.js:871:5)
    at each (/tools/isobuild/import-scanner.js:907:14)
    at _.each._.forEach (/home/yorrd/.meteor/packages/meteor-tool/.1.8.1-beta.13.11369o3.fchv++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
    at ImportScanner._scanFile (/tools/isobuild/import-scanner.js:871:5)
    at outputFiles.forEach.file (/tools/isobuild/import-scanner.js:529:14)
    at Array.forEach (<anonymous>)
    at ImportScanner.scanImports (/tools/isobuild/import-scanner.js:527:22)
    at sourceBatches.forEach.batch (/tools/isobuild/compiler-plugin.js:1301:17)
    at Array.forEach (<anonymous>)
    at Function.computeJsOutputFilesMap (/tools/isobuild/compiler-plugin.js:1269:19)
    at ClientTarget._emitResources (/tools/isobuild/bundler.js:1121:8)
    at buildmessage.enterJob (/tools/isobuild/bundler.js:847:12)
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ClientTarget.make (/tools/isobuild/bundler.js:835:18)
    at /tools/isobuild/bundler.js:3143:14
    at webArchs.forEach.arch (/tools/isobuild/bundler.js:3294:25)
    at Array.forEach (<anonymous>)
    at /tools/isobuild/bundler.js:3248:14
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at bundle (/tools/isobuild/bundler.js:3124:31)
    at files.withCache (/tools/isobuild/bundler.js:3069:32)
    at Object.withCache (/tools/fs/files.js:1712:12)
    at Object.bundle (/tools/isobuild/bundler.js:3069:16)
    at Profile.run (/tools/runners/run-app.js:569:24)
    at Function.run (/tools/tool-env/profile.js:490:12)
    at bundleApp (/tools/runners/run-app.js:568:34)
    at AppRunner._runOnce (/tools/runners/run-app.js:610:35)
    at AppRunner._fiber (/tools/runners/run-app.js:908:28)
    at /tools/runners/run-app.js:398:12
@yorrd yorrd changed the title Crash when using lighten() function Crash when using lighten() function in a wrong way Jan 13, 2019
@met5678
Copy link

met5678 commented Jan 28, 2019

I'm seeing this error frequently lately, wonder if a meteor upgrade broke something?

@met5678
Copy link

met5678 commented Jan 28, 2019

Note that I'm seeing this on meteor 1.8.0.2 as well.

@sebakerckhof
Copy link
Collaborator

I can't seem to reproduce this.

I get something like:

While processing files with fourseven:scss (for target web.browser):
   /client/test.scss: Scss compiler error: Error: Undefined variable:
   "$color".
   on line 3 of {}/imports/_import.scss
   from line 1 of {}/client/test.scss
   >>   background-color: lighten($color, 2)

Can you make a small reproduction?

@sebakerckhof sebakerckhof added the awaiting-feedback Waiting for feedback from the issue reporter label Mar 13, 2019
@nathanschwarz
Copy link

Hi there,

I have the same errors all the time.
I think it's because we're using the meteor static-html package, and we're importing the scss file in our Js files as so:

import 'path/.../.../file.scss'

Meteor seems to crash because it can't import the css file in JS ( it doesn't exists yet because of a failed scss compilation).

It's really hard to debug because we can't see where the error is in our scss.

I wonder if you can do something about it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Waiting for feedback from the issue reporter
Projects
None yet
Development

No branches or pull requests

4 participants