Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Error when compiling sass/scss #14

Closed
eduardhojbota opened this issue Jul 29, 2015 · 21 comments
Closed

Error when compiling sass/scss #14

eduardhojbota opened this issue Jul 29, 2015 · 21 comments

Comments

@eduardhojbota
Copy link

Now when compiling a valid scss/sass file, the following error is received:

Failed to compile D:/Projects/nepenthe-on-node/app/styles/main.scss: A dynamic link library (DLL) initialization routine failed.
d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compilers\node_modules\node-sass\vendor\win32-x64-44\binding.node
Error: A dynamic link library (DLL) initialization routine failed.
d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compilers\node_modules\node-sass\vendor\win32-x64-44\binding.node
  at Error (native)
  at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
  at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:137:20)
  at Module.load (module.js:351:32)
  at Function.Module._load (module.js:306:12)
  at Module.require (module.js:361:17)
  at require (module.js:380:17)
  at Object.<anonymous> (d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compilers\node_modules\node-sass\lib\index.js:16:15)
  at Module._compile (module.js:426:26)
  at BabelCompiler.loadFile (d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compile-cache\lib\compile-cache.js:199:23)
  at Object.value [as .js] (d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compile-cache\lib\compile-cache.js:240:26)
  at Module.load (module.js:351:32)
  at Function.Module._load (module.js:306:12)
  at Module.require (module.js:361:17)
  at require (module.js:380:17)
  at ScssCompiler.initializeCompiler (d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compilers\lib\css\scss.js:91:14)
  at ScssCompiler.loadFile (d:\Projects\nepenthe-on-node\node_modules\electron-compile\node_modules\electron-compile-cache\lib\compile-cache.js:206:49)
  at Function.<anonymous> (d:\Projects\nepenthe-on-node\node_modules\electron-compile\lib\protocol-hook.js:134:33)

Platform: Windows 8.1 x64

P.S. It works on OSX 10.10 tho

@anaisbetts
Copy link
Contributor

Ugh, this is a node-sass bug, you can try using https://github.com/electronjs/electron-rebuild - node-pre-gyp sucks with Electron right now

@eduardhojbota
Copy link
Author

Unfortunately electron-rebuild did not help.

@eduardhojbota
Copy link
Author

After further investigation, it the origin of these issues is actually node-sass.

@anaisbetts
Copy link
Contributor

@eduardhojbota If there is a node-sass bug open, can you link it here?

@eduardhojbota
Copy link
Author

There isn't one at the moment, so I will create one and post it here.

P.S. sass/node-sass#1047

@anaisbetts
Copy link
Contributor

@eduardhojbota Thanks!

@eduardhojbota
Copy link
Author

Looks like we've got an answer pretty quickly. You might want to check it out.

@eduardhojbota
Copy link
Author

Considering that node-sass does not offer support for electron (atom-shell) I shall reopen this issue.

@eduardhojbota eduardhojbota reopened this Aug 10, 2015
@anaisbetts
Copy link
Contributor

I have a plan to fix this, 🔜

@jgeurts
Copy link

jgeurts commented Sep 21, 2015

Any word on a resolution for this issue?

@AnthonyPorthouse
Copy link

@jgeurts Running Electron v0.33.1 and electron-compile v0.9.2, this seems to work correctly for me now at least.

@eduardhojbota
Copy link
Author

@AnthonyPorthouse, could you please specify your operating system as well?

@JoyceBabu
Copy link

I am getting the same error, but with ZeroMQ (zmq). Running electron-rebuild worked for me.

@AnthonyPorthouse
Copy link

@eduardhojbota Linux x86-64, but I was having the same issue previously. I'll try it on windows once I get back from work.

Edit: Ok yeah, still having this problem on Windows 10

@anaisbetts
Copy link
Contributor

Sass is removed from the newest version of electron-compile, sorry :(

@eduardhojbota
Copy link
Author

But if the node-sass was working for Unix, why remove it entirely?

@anaisbetts
Copy link
Contributor

@eduardhojbota In the latest version of node-sass, it breaks Linux too for everyone, even if you're not using node-sass, by including a module that uses node-pre-gyp

@Aldlevine
Copy link

So I stumbled upon this issue when trying to get node-sass to work in electron myself. I figured out a way to do it on my system (Debian Jessie). Using nvm I switched to the version of node that electron is using, currently 5.1.1, and installed node-sass. It worked flawlessly after that. Just figured that I'd share my solution.

@stefanKuijers
Copy link

@Aldlevine That's a great first step. For me it works as well on Xubuntu. When create my app on Xubuntu and run it on Xubuntu it works but it does not work if I want to distribute the app for Windows or OSX.

Do you know how to solve this for other platforms as well?
For me it looks like the only solution would be to have Windows, OSX and Lunix installed and build from a platform for that platform. :|

What are your thoughts on that?

@stefanKuijers
Copy link

@paulcbetts so, if I understand right; the solution merged in with this PR --runtime=electron is no longer valid?

@stefanKuijers
Copy link

@Aldlevine I've tried the same for windows but that did not solve the problem. :(

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

No branches or pull requests

7 participants