meteor-css-modules icon indicating copy to clipboard operation
meteor-css-modules copied to clipboard

libsass problem

Open gregorybleiker opened this issue 9 years ago • 30 comments

Hi I tried to update my meteor 1.4.2 beta13 and now I'm stuck... anybody have a pointer what might be wrong here? I've nuked .meteor in home and in project and node_modules etc... but to no avail. I'm on arch linux.

Any help welcome.

=> Errors prevented startup:

While processing files with nathantreid:css-modules (for target web.browser): native: ENOENT: no such file or directory, scandir '/node_modules/meteor/mss/node_modules/node-sass/vendor' at Error (native) at Object.fs.readdirSync (fs.js:808:18) at Object.getInstalledBinaries (node_modules/meteor/mss/node_modules/node-sass/lib/extensions.js:119:1) at foundBinariesList (node_modules/meteor/mss/node_modules/node-sass/lib/errors.js:20:1) at foundBinaries (node_modules/meteor/mss/node_modules/node-sass/lib/errors.js:15:1) at Object.module.exports.missingBinary (node_modules/meteor/mss/node_modules/node-sass/lib/errors.js:45:1) at meteorInstall.node_modules.meteor.mss.node_modules.node-sass.lib.index.js (node_modules/meteor/mss/node_modules/node-sass/lib/index.js:15:1) 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 new ScssProcessor (packages/mss/scss-processor.js:12:55) at CssModulesBuildPlugin._setupPreprocessors (packages/mss/css-modules-build-plugin.js:104:31) at CssModulesBuildPlugin.processFilesForTarget (packages/mss/css-modules-build-plugin.js:53:10)

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

gregorybleiker avatar Oct 18 '16 19:10 gregorybleiker

I have exactly the same issue on linux mint.

I did find this, which is possibly related: https://github.com/sass/node-sass/issues/1579

But I've not had any joy with it yet. To be honest I'm not even sure where node_modules/meteor/mss/node_modules/node-sass/ is supposed to be?

ChrisSalt avatar Oct 18 '16 22:10 ChrisSalt

I haven't gotten anywhere either... for starters I don't know how to debug the meteor build process...

The only thing I found was that the meteor link in ~/.meteor/meteor still pointed to the 1.4.1.2 meteor. I manually changed it but it didn't change anything. BTW I was thinking the same about those weird paths...

gregorybleiker avatar Oct 19 '16 05:10 gregorybleiker

I'm getting the same thing.

=> Started proxy.                             
=> Errors prevented startup:                  

   While processing files with nathantreid:css-modules (for target web.browser):
   native: ENOENT: no such file or directory, scandir '/node_modules/meteor/mss/node_modules/node-sass/vendor'
   at Error (native)
   at Object.fs.readdirSync (fs.js:808:18)
   at Object.getInstalledBinaries (node_modules/meteor/mss/node_modules/node-sass/lib/extensions.js:119:1)
   at foundBinariesList (node_modules/meteor/mss/node_modules/node-sass/lib/errors.js:20:1)
   at foundBinaries (node_modules/meteor/mss/node_modules/node-sass/lib/errors.js:15:1)
   at Object.module.exports.missingBinary (node_modules/meteor/mss/node_modules/node-sass/lib/errors.js:45:1)
   at meteorInstall.node_modules.meteor.mss.node_modules.node-sass.lib.index.js
   (node_modules/meteor/mss/node_modules/node-sass/lib/index.js:15:1)
   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 new ScssProcessor (packages/mss/scss-processor.js:12:55)
   at CssModulesBuildPlugin._setupPreprocessors (packages/mss/css-modules-build-plugin.js:104:31)
   at CssModulesBuildPlugin.processFilesForTarget (packages/mss/css-modules-build-plugin.js:53:10)

johnf76 avatar Oct 19 '16 07:10 johnf76

Has anyone had luck with this? I've stuck and having a tough go figuring out. It looks like it might be an issue with node-sass being called within the plugin.

johnf76 avatar Oct 21 '16 01:10 johnf76

Same problem here.

hmontes avatar Oct 22 '16 00:10 hmontes

@nathantreid Same error with the latest 1.4.2 RC (1.4.2-rc.2)

hmontes avatar Oct 22 '16 15:10 hmontes

Just an FYI for those still having the problem, I found it works when reverting back to version 2.2.2. I'm on 1.4.2-rc.1

johnf76 avatar Oct 23 '16 06:10 johnf76

I'm getting the same issue on 1.4.2 public release.

alexpricedev avatar Oct 26 '16 16:10 alexpricedev

I'm traveling right now, but will look into this as soon as I can.

akanix42 avatar Oct 26 '16 16:10 akanix42

Thanks @nathantreid I tried to do some investigation, but failed miserably. I have no idea where this call stack comes from (any enlightenment very welcome) and have just for the sake of feeling a bit better opened a question on the meteor forum (https://forums.meteor.com/t/build-error-paths-how-to-interpret/30799).

gregorybleiker avatar Oct 26 '16 17:10 gregorybleiker

Did some more digging... it seems to me that node-sass is included in the plugin for some reason (even though the readme says it is should be a user install). The mss_plugin.js seems to include a node-sass/lib/extensions.js, which is responsible for trying to find the binaries at the virtual path location.

gregorybleiker avatar Oct 31 '16 06:10 gregorybleiker

OK, more digging... downloading the package from github and putting it in a (newly created) directory in my meteor app directory made version 2.3.0 work for me. This makes me belive that something went wrong while creating the npm package...

gregorybleiker avatar Nov 01 '16 17:11 gregorybleiker

@gregorybleiker could you explain this more in detail? I'm having trouble following your steps, mainly, what is "the package" and which "(newly created) directory"?

neopostmodern avatar Nov 03 '16 18:11 neopostmodern

@neopostmodern: As an example: your meteor app is located under /somedir/yourapp

/somedir/yourapp will have directories like client/, server/, imports/ and so on. In /somedir/yourapp create the directory packages: /somedir/yourapp/packages

In /somedir/yourapp/packages clone the github of 2.3, so you should end up with the contents in /somedir/yourapp/packages/nathantreid_css-modules

Then in /somedir/yourapp/.meteor/packages include nathantreid:css-modules (without version number) This should pick up the version in the packages directory.

Personally I renamed the package to my:css-modules (and the directory in packages to packages/my_css-modules and the contents of packages/my_css-modules/package.js but I don't know if that is really necessary...

gregorybleiker avatar Nov 04 '16 08:11 gregorybleiker

Mh, strange. Doesn't work for me.

Prior to your steps I get this error:

   While processing files with nathantreid:css-modules (for target web.browser):
   native: ENOENT: no such file or directory, scandir '/node_modules/meteor/mss/node_modules/node-sass/vendor'

Then I do (cd packages && git clone https://github.com/nathantreid/meteor-css-modules.git) and the next error is:

mss: updating npm dependencies -- app-module-path, camelcase, cjson, colors, common-tags, css-modules-loader-core, lru-cache, path-is-absolute, postcss, postcss-modules-local-by-default, postcss-modules-extract-imports,
postcss-modules-scope, postcss-modules-values, ramda, recursive-readdir, string-template...
Segmentation fault (core dumped)

Then rm -rf .meter/local and the next error is:

Unexpected mongo exit code 100. Restarting.   
Unexpected mongo exit code 100. Restarting.   
Unexpected mongo exit code 100. Restarting.   
Can't start Mongo server. 

Then (cd packages/meteor-css-modules/ && yarn) and a few more rm -rf .meter/local and the next error is:

  While loading plugin `mss` from package `nathantreid:css-modules`:
   packages/modules-runtime.js:109:19: Cannot find module './fibers'
   at require (packages/modules-runtime.js:109:19)
   at meteorInstall.node_modules.meteor.mss.node_modules.fibers.future.js (<runJavaScript-4>:13736:13)
   at fileEvaluate (packages/modules-runtime.js:181:9)
   at Module.require (packages/modules-runtime.js:106:16)
   at Module.Mp.import (/home/neopostmodern/.meteor/packages/modules/.0.7.7.127y3t4++os+web.browser+web.cordova/npm/node_modules/reify/lib/runtime.js:70:16)
   at meteorInstall.node_modules.meteor.mss.stylus-processor.js (<runJavaScript-4>:1171:142)
   at fileEvaluate (packages/modules-runtime.js:181:9)
   at require (packages/modules-runtime.js:106:16)
   at <runJavaScript-4>:14790:1
   at <runJavaScript-4>:14799:3

Can't get beyond that.

neopostmodern avatar Nov 07 '16 16:11 neopostmodern

At least it seems to be picking up the version in packages... But for me its core dumping on me now as well... more or less out of nowhere (ie. running yesterday, broke today)... maybe you can get around it by setting some stuff in package.json for the css-modules, but personally I'm so frustrated I'm going on an Elixir spree... maybe I'll check back in a few months, but up to now the meteor experience has been very frustrating, with most time spent in tooling and integrating... Good luck anyhow.

gregorybleiker avatar Nov 07 '16 18:11 gregorybleiker

@gregorybleiker Thanks for all the digging you did. I messed up the publish of 2.3.0, and have just published 2.3.1 to address that. Please give it a try!

akanix42 avatar Nov 09 '16 18:11 akanix42

Causes SIGSEGV. If I remove the package it runs well. Re-adding causes SIGSEGV. Can't figure out how to look at the dump unfortunately.

Setup: Meteor 1.4.2.1 on Ubuntu 16.04, nvm defaults to 7 (switching to 6 makes no difference).

neopostmodern avatar Nov 10 '16 12:11 neopostmodern

I have the same issue. For now sticking with fourseven:scss

wesleyfsmith avatar Nov 17 '16 02:11 wesleyfsmith

I've just updated to the latest of meteor, meteor-css-modules and node-sass and the scss extension seems to be working perfectly now!

alexpricedev avatar Nov 26 '16 18:11 alexpricedev

Oh.. Now I'm doing this:

"globalVariables": [
  "node_modules/@blueprintjs/core/src/blueprint.scss"
],

and I'm getting the segmentation fault again...

EDIT: This seems to work fine for now though: import '@blueprintjs/core/dist/blueprint.css';

alexpricedev avatar Nov 26 '16 18:11 alexpricedev

Doesn't work for me, even when cloning from GitHub. Still SIGSEGV.

neopostmodern avatar Nov 28 '16 09:11 neopostmodern

@nathantreid - any word if this will fix? If not, can you recommend an alternative?

neopostmodern avatar Dec 23 '16 12:12 neopostmodern

The old version works for me, but super slow on my larger app to build & rebuild.   I get the same issue as you with the current version

On Dec 23, 2016, 04:59, at 04:59, neopostmodern [email protected] wrote:

@nathantreid - any word if this will fix? If not, can you recommend an alternative?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/nathantreid/meteor-css-modules/issues/73#issuecomment-268986496

johnf76 avatar Dec 23 '16 21:12 johnf76

I'm planning to really dig into this over Christmas break (so next week). Without having looked into it, I think the issue you are now having is the same as #81.

akanix42 avatar Dec 23 '16 22:12 akanix42

Maybe related to https://github.com/sass/node-sass/issues/1757?

neopostmodern avatar Dec 28 '16 23:12 neopostmodern

Is anyone still experiencing this after taking into account sass/node-sass#1757?

akanix42 avatar Jan 29 '17 16:01 akanix42

Yes, I think it's still occurring for me. I rebuilt the node-sass package using these commands.

I commented the nathantreid:css-modules line, started the meteor app, everything is fine (except no styles), uncomment the package, SIGSEGV.

Changes to your project's package version selections:

nathantreid:css-modules  added, version 2.4.0


Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

neopostmodern avatar Feb 24 '17 14:02 neopostmodern

@neopostmodern Sorry for the delayed response; when you rebuilt using this command:

cd node_modules/node-sass && node scripts/build -f && cd ../..

Did you adjust it for Meteor? All npm, node, or yarn commands should be prefixed with meteor (or you can just use nvm to switch to the meteor node version). In this case, it should be meteor node scripts/build -f . Otherwise based on your post you'll be rebuilding it using node 7 but the latest version of Meteor 1.4 needs node 4.7.3.

akanix42 avatar Mar 05 '17 17:03 akanix42

Oh, I in fact hadn't. Unfortunately, it still throws the same error when prefixing it accordingly.

neopostmodern avatar Mar 23 '17 17:03 neopostmodern