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

1.4-beta.1 - fourseven:scss package broken #7297

Closed
mikestokes opened this Issue Jun 24, 2016 · 29 comments

Comments

@mikestokes

mikestokes commented Jun 24, 2016

Running OS X El Capitan and upgrading to 1.4-beta.1 there is an issue that seems to be related to the npm and/or node update with the fourseven:scss package for compiling sass files.

Re-creation:

  1. Upgrade to Meteor 1.4-beta.1
  2. Install the fourseven:scss package using the "meteor add" command
  3. Remove NPM packages folder: rm -rf node_modules
  4. Install NPM packages: meteor npm install
  5. Run meteor

`[[[[[ ~/git/fletchers/fd.shopfloor.meteor ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

While loading plugin compileScssBatch from package fourseven:scss:

/Users/mike/.meteor/packages/fourseven_scss/.3.4.3.fcqret++os.osx.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.osx.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/lib/extensions.js:158:11:
The libsass binding was not found in
/Users/mike/.meteor/packages/fourseven_scss/.3.4.3.fcqret++os.osx.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.osx.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/vendor/darwin-x64-46/binding.node
This usually happens because your node version has changed.
Run npm rebuild node-sass to build the binding for your current node
version.
at Object.sass.getBinaryPath
(/Users/mike/.meteor/packages/fourseven_scss/.3.4.3.fcqret++os.osx.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.osx.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/lib/extensions.js:158:11)
at Object.
(/Users/mike/.meteor/packages/fourseven_scss/.3.4.3.fcqret++os.osx.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.osx.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/lib/index.js:16:36)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Module.Mp.load
(/Users/mike/.meteor/packages/meteor-tool/.1.4.0-beta.1.1jq88fv++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/reify/node/runtime.js:16:23)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/tools/isobuild/bundler.js:1570:22)
at Object.require (/tools/isobuild/bundler.js:1547:11)
at meteorInstall.node_modules.meteor.compileScssBatch.plugin.compile-scss.js
(packages/compileScssBatch/plugin/compile-scss.js:3:18)
at fileEvaluate (packages/modules-runtime.js:158:9)
at require (packages/modules-runtime.js:92:16)
at :349:1
at :355:3

=> Your application has errors. Waiting for file change.`

There is an open issue in the forseven:scss repo but I think this may point to a Meteor bug.

@clayne11

This comment has been minimized.

clayne11 commented Jun 25, 2016

I would recommend using nathantreid:css-modules instead. It has built in support for PostCSS and generally more configurable. You don't have to use CSS modules to use it, you can use and PostCSS plugins that you'd like and it also compiles SCSS.

@mikestokes

This comment has been minimized.

mikestokes commented Jun 25, 2016

Thanks @clayne11 I'll give it a try for SCSS.

@meteorza

This comment has been minimized.

meteorza commented Jun 25, 2016

I use poetic:materialize-scss which auto installs fourseven:scss, so I can not use an alternative scss compiler. I get the same error as mikestokes when using meteor 1.4 beta.

@nathantreid

This comment has been minimized.

nathantreid commented Jun 25, 2016

Referring to the Meteor 1.4 announcement, my guess is that you need to install a compiler toolchain in order to build libsass (since it's still in beta, I don't know if this documented yet, and unfortunately I don't where you'd get this toolchain):

To solve this problem for Node 4 and any future Node updates, we’re going to require Meteor users who rely on packages with binary dependencies to install a compiler toolchain on their development and build machines. We’ll make sure this is a straightforward and well documented process. In addition, we’ll ship Meteor’s core dependencies with pre-built binaries. This will mean that new and simple app development will continue to work without requiring a compiler toolchain.

My css-modules package works (at least I hope it does, I haven't tested 1.4 yet) because I require the user to meteor npm install node-sass instead of including it in the package (which also allows the user to pick the version of node-sass that they want to use).

@ramijarrar

This comment has been minimized.

ramijarrar commented Jun 26, 2016

@nathantreid "compiler toolchain" would refer to the requirements for node-gyp (i.e python & C/C++ compiler). But node-sass ships with pre-built binaries so I don't think that is the issue.

Allowing people to bring their own version of node-sass is definitely a better approach (and loading npm dependencies in meteor packages can lead to duplication) but this should still work regardless.

@ramijarrar

This comment has been minimized.

ramijarrar commented Jun 26, 2016

@sebakerckhof Would it be possible to release a new version of fourseven:scss which loads node-sass as a "peer dependency" (using tmeasday:check-npm-versions)?

@donflopez

This comment has been minimized.

donflopez commented Jun 27, 2016

I've solved it cloning the fourseven:scss package into my local packages folder and updating the node-sass version in the package.js file to 3.8.0

@sebakerckhof

This comment has been minimized.

Contributor

sebakerckhof commented Jun 27, 2016

@ramijarrar thanks for looking into this.
TBH, I didn't really knew what peer dependencies were. I looked it up: https://nodejs.org/en/blog/npm/peer-dependencies/ and I don't find the description fitting for this use case. So I'll first see if upgrading node-sass to 3.8.0 fixes it for everyone and if not I'd rather wait for input from @benjamn

@ramijarrar

This comment has been minimized.

ramijarrar commented Jun 27, 2016

@sebakerckhof It wasn't very clear out-of-context but I was actually referring to this approach for loading npm deps in an atmosphere package.

@ramijarrar

This comment has been minimized.

ramijarrar commented Jun 27, 2016

Found some more information about this in the node-sass changelog (see v3.5.1), looks like they didn't support Node 4 on 64bit OSX until v3.7.0.

@sebakerckhof

This comment has been minimized.

Contributor

sebakerckhof commented Jun 27, 2016

3.7.0 adds node 6 support.
If you look here: https://github.com/sass/node-sass/releases/tag/v3.4.2 it states OSX 64-bit was already supported with node 4.

3.5.1 just states there are better error messages and it takes osx 64-bit as an example.

Anyway, will publish a new version later today.

@ramijarrar

This comment has been minimized.

ramijarrar commented Jun 27, 2016

@sebakerckhof Okay, I'll try again with the new release as soon as that is published. Are you still just planning to update node-sass?

@sebakerckhof

This comment has been minimized.

Contributor

sebakerckhof commented Jun 27, 2016

I just released fourseven:scss 3.8.0, with node-sass 3.8.0.

Tested with 1.4-beta.2, error is still present, although a somewhat more useful error message:

   While loading plugin `compileScssBatch` from package `fourseven:scss`:

   C:\Users\seke\AppData\Local\.meteor\packages-from-server\kndedu01.barco.comX3005\fourseven_scss\3.8.0\plugin.compileScssBatch.os.windows.x86_32\npm\node_modules\meteor\compileScssBatch\node_modules\node-sass\lib\index.js:15:11:
   Missing binding
   C:\Users\seke\AppData\Local\.meteor\packages-from-server\kndedu01.barco.comX3005\fourseven_scss\3.8.0\plugin.compileScssBatch.os.windows.x86_32\npm\node_modules\meteor\compileScssBatch\node_modules\node-sass\vendor\win32-ia32-46\binding.node
   Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 4.x

   Found bindings for the following environments:
   - Windows 32-bit with Node 0.10.x

   This usually happens because your environment has changed since running `npm install`.
   Run `npm rebuild node-sass` to build the binding for your current environment.
   at Object.<anonymous>
   (C:\Users\seke\AppData\Local\.meteor\packages-from-server\kndedu01.barco.comX3005\fourseven_scss\3.8.0\plugin.compileScssBatch.os.windows.x86_32\npm\node_modules\meteor\compileScssBatch\node_modules\node-sass\lib\index.js:15:11)
   at Module._compile (module.js:409:26)
   at Object.Module._extensions..js (module.js:416:10)
   at Module.load (module.js:343:32)
   at Module.Mp.load
   (C:\Users\seke\AppData\Local\.meteor\packages-from-server\kndedu01.barco.comX3005\meteor-tool\1.4.0-beta.2\mt-os.windows.x86_32\dev_bundle\lib\node_modules\reify\node\runtime.js:16:23)
   at Function.Module._load (module.js:300:12)
   at Module.require (module.js:353:17)
   at require (internal/module.js:12:17)
   at Object.<anonymous> (C:\tools\isobuild\bundler.js:1570:22)
   at Object.require (C:\tools\isobuild\bundler.js:1547:11)
   at meteorInstall.node_modules.meteor.compileScssBatch.plugin.compile-scss.js (packages/compileScssBatch/plugin/compile-scss.js:3:18)
   at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
   at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
   at <runJavaScript-41>:349:1
   at <runJavaScript-41>:355:3

This makes sense, since it was build on 0.10.x (meteor build server). But Meteor should have ran the rebuild which it didn't I suppose?

Will wait for input from @benjamn

@mikeifomin

This comment has been minimized.

mikeifomin commented Jul 2, 2016

Update to Meteor 1.4-beta.7 does not help

@paralin

This comment has been minimized.

paralin commented Jul 4, 2016

Any updates here?

@StorytellerCZ

This comment has been minimized.

Contributor

StorytellerCZ commented Jul 11, 2016

Just updated to 1.4-beta.9 and still an issue. 😢

@abernix

This comment has been minimized.

Member

abernix commented Jul 11, 2016

To those that are still experiencing this issue, what OS are you using?

@mikeifomin

This comment has been minimized.

mikeifomin commented Jul 11, 2016

I have the same in 1.4-beta.9 on OS X and Ubuntu 14.04.

Reproduce

   meteor create test-app --release=1.4-beta.9 && cd test-app && meteor add fourseven:scss && meteor run

Output on Ubuntu

=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

   While loading plugin `compileScssBatch` from package `fourseven:scss`:

   /root/.meteor/packages/fourseven_scss/.3.8.0_1.1vehobq++os.linux.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.linux.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/lib/index.js:15:11:
   Missing binding
   /root/.meteor/packages/fourseven_scss/.3.8.0_1.1vehobq++os.linux.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.linux.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/vendor/linux-x64-46/binding.node
   Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 4.x

   Found bindings for the following environments:
   - Unknown environment (.meteor-portable)
   - Linux 64-bit with Node 0.10.x

   This usually happens because your environment has changed since running `npm install`.
   Run `npm rebuild node-sass` to build the binding for your current environment.
   at Object.<anonymous>
   (/root/.meteor/packages/fourseven_scss/.3.8.0_1.1vehobq++os.linux.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.linux.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/lib/index.js:15:11)
   at Module._compile (module.js:409:26)
   at Object.Module._extensions..js (module.js:416:10)
   at Module.load (module.js:343:32)
   at Module.Mp.load
   (/root/.meteor/packages/meteor-tool/.1.4.0-beta.9.1yjtbnw++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/reify/node/runtime.js:16:23)
   at Function.Module._load (module.js:300:12)
   at Module.require (module.js:353:17)
   at require (internal/module.js:12:17)
   at Object.<anonymous> (/tools/isobuild/bundler.js:1565:22)
   at Object.require (/tools/isobuild/bundler.js:1542:11)
   at meteorInstall.node_modules.meteor.compileScssBatch.plugin.compile-scss.js (packages/compileScssBatch/plugin/compile-scss.js:3:18)
   at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
   at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
   at <runJavaScript-41>:349:1
   at <runJavaScript-41>:355:3

@benjamn I think this issue should be opened.

@benjamn benjamn reopened this Jul 12, 2016

@benjamn benjamn self-assigned this Jul 12, 2016

@jbbr

This comment has been minimized.

jbbr commented Jul 13, 2016

Works for me in 1.4-beta.10 - thanks!
I had to remove $HOME/.meteor and/or .meteor/local to get finally rid of this error message.

@finchalyzer

This comment has been minimized.

finchalyzer commented Jul 13, 2016

Issue gone with 1.4-beta.10 on OS X 10.11.5. Only after clearing $HOME/.meteor

@ixdi

This comment has been minimized.

ixdi commented Jul 13, 2016

I'm still experiencing this issue with 1.4-beta.13. I tried unsuccessfully to remove $HOME/.meteor and .meteor/local.

I'm running on Arch linux with latest updates (kernel 4.6.3)

@sebakerckhof

This comment has been minimized.

Contributor

sebakerckhof commented Jul 13, 2016

Works for me on Win 10

@benjamn benjamn referenced this issue Jul 14, 2016

Merged

Release 1.3.5 #7407

@lope

This comment has been minimized.

lope commented Jul 15, 2016

I had some other problems upgrading cleanly from 1.3.4.1 > 1.3.4.3 > 1.3.4.4 > 1.4 beta 9. Abernix from #meteor is going to try reproduce.
So it's hard to say what was going on with my setup with certainty because my proj/.meteor/release file was stuck on 1.3.4.3 but I definitely noticed huge rebuild performance improvements after running the update command to 1.4-beta.9.

But whatever the case is. When I tried to force meteor run --release 1.4-beta.9 I got a similar issue.

errors prevented startup. While loading plugin `compileScssBatch` from package `fourseven:scss`:
/home/bob/.meteor/packages/fourseven_scss/.3.8.0_1.pgz3kx++os.linux.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.linux.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/lib/index.js:15:11: Missing Binding

/home/bob/.meteor/packages/fourseven_scss/.3.8.0_1.pgz3kx++os.linux.x86_64+web.browser+web.cordova/plugin.compileScssBatch.os.linux.x86_64/npm/node_modules/meteor/compileScssBatch/node_modules/node-sass/vendor/linux-x64-46/binding.node

Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 4.x

Found bindings for the following environments:- Unknown environment (.meteor-portable) - Linux 64-bit with Node 0.10.x

This usually happens because your environment has changed since running `npm install`.

@ixdi @mikeifomin

But then I just nuked my whole ~/.meteor, manually edited proj/.meteor/release and deleted proj/.meteor/dev_bundle, meteor update --release 1.4-beta.14 release and now using 1.4-beta-14 without fourseven:scss issues.

#Inside project/.meteor
echo METEOR@1.4-beta.14 > release
rm dev_bundle

#update global meteor installation
sudo rm -rf ~/.meteor
meteor update --release 1.4-beta.14 release

Linux 4.4 kernel.

Tip: Ignore the version shown on proj/.meteor/dev_bundle (but definitely delete it when performing the above) Pay more attention to proj/.meteor/local/dev_bundle.

PS: You guys might be interested in this: Lazy/Incremental Loading CSS SCSS with React and FlowRouter (seems to be working in 1.4 beta 9)

@mikeifomin

This comment has been minimized.

mikeifomin commented Jul 26, 2016

@lope thank you!

@Metrophobe

This comment has been minimized.

Metrophobe commented Jul 29, 2016

any solution guys ? I am using the materialize:materialize package and it seems like the fourseven:scss is breaking everything. I tried the above but still am getting the same error.

@sebakerckhof

This comment has been minimized.

Contributor

sebakerckhof commented Jul 29, 2016

@Metrophobe can you create a minimal reproduction?

@lope

This comment has been minimized.

lope commented Jul 31, 2016

@mikeifomin you're welcome.
Okay guys. My build times are pretty decent since I moved all of my .jsx .scss etc files into /imports/client/ thanks to all of benjamn and MDG's awesome work. Around 2.5 seconds or less when changing client files.

I've not ventured into SSR terrirory yet, which would raise build times back into the 5.7 second territory for me. But apparently there's a hack where you can just include all the client files in ONE SSR related file and just comment out that file for faster build times while you're developing (so you won't have SSR while developing) then uncomment it for production. I really know nothing about SSR at this point, so this is just heresy.

I'm going to unsubscribe from this thread now due to too many github emails. Write @lope if you want me to see your msg if you've got something useful to share about build times and SSR.

@felixb101

This comment has been minimized.

felixb101 commented Aug 9, 2016

Still get that version 3.8.1 is not compatible with Meteor , any updates here?

@Metrophobe

This comment has been minimized.

Metrophobe commented Aug 10, 2016

@felixb101 To resolve the issue and I have said this before and got nagged by someone who did not even understand the origin of the problem or worse still reiterated what i myself had said in some other thread days before made me refrain from commenting for a while .... so here you go.

if fourseven:scss is your offending package ... goto packages.json in the .meteor folder and insert it PRIOR to the package being downloaded and causing the crash and you're good to go!

So for example if materialize:materialize - has a dependency fourseven:scss and you get the long crashing message. then simply place fourseven:scss before materialize:materialize (in packages.json) and you're good to go! There is a defect in the toolchain which I had pointed out quite some time ago and its not managing all dependencies correctly but is loading them ok.

This applies to any other error you get in any other dependency I got one in bcrypt and coffescript last time. Used this method and resolved all issues.

Hope this helps you sir.
Good Day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment