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

ENOENT error at "variables" step (Windows) #43

Closed
batjko opened this issue Sep 10, 2016 · 9 comments
Closed

ENOENT error at "variables" step (Windows) #43

batjko opened this issue Sep 10, 2016 · 9 comments

Comments

@batjko
Copy link

batjko commented Sep 10, 2016

Hi there,
I'm getting this error when I try to verify the very first exercise:

Solution:

$color: #000;

body {
  color: $color;
}

Error:

PS C:\git\learn-sass> learn-sass verify app.scss
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn C:\Users\pmetz\AppData\Roaming\npm\node_modules\learn-sass\node_modules\node-sass\bin\node-sass ENOENT
    at exports._errnoException (util.js:1007:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

As you can see, this is on Windows. I've tried saving the file with *nix line endings instead, but still the same.

EDIT:
Note, I have installed learn-sass on the bash subsystem of Windows. It works fine there, so this is evidently an issue on Windows shells only.

@batjko batjko changed the title ENOENT error at "variables" step ENOENT error at "variables" step (Windows) Sep 10, 2016
@dloret
Copy link

dloret commented Nov 2, 2016

Hello, I'm on Windows 10 and having the same issue on the "Variables" and "Nesting" exercises. Looks like I can't use your wonderful learning resource on windows. That's a waste:
aside { ul { margin: 0; } a { color: red; } }

`PS C:\Users\I079276\Desktop> learn-sass verify ss.scss
events.js:160
throw er; // Unhandled 'error' event
^

Error: spawn C:\Users\I079276\AppData\Roaming\nvm\v7.0.0\node_modules\learn-sass\node_modules\node-sass\bin\node-sass ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)`

@fega
Copy link

fega commented Nov 10, 2016

I'm having a similar error. :/

learn-sass verify style.scss
events.js:141
throw er; // Unhandled 'error' event
^

Error: spawn C:\Users\Fabian Gutierrez\AppData\Roaming\npm\node_modules\learn-sass\node_modules\node-sass\bin\node-sass ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)

@jderijke
Copy link

same here on win10
also nodeschool links to https://github.com/claudiopro/learn-sass instead of this repository

@claudiopro
Copy link
Member

claudiopro commented Feb 28, 2017

Unfortunately I don't have a Windows system to repro locally. The ENOENT error suggests node-sass can't be resolved as path to a file, it's either a problem with the path itself or case sensitive FS. I'll raise a hand to seek help to contributors on Windows systems.

Thanks for bringing that up @opperbolt, I moved the repo under the workshopper org but forgot to update the NodeSchool website. I'll do that now.

@claudiopro
Copy link
Member

Issue looks similar to this StackOverflow post.

@claudiopro
Copy link
Member

This seems to be the root cause: nodejs/node-v0.x-archive#2318

@claudiopro
Copy link
Member

@batjko @dloret @fega @opperbolt can you tell what version of Node are you using? Thanks.

@claudiopro
Copy link
Member

Nice explanation of the issue in this doc page: https://nodejs.org/api/child_process.html#child_process_spawning_bat_and_cmd_files_on_windows

I'll switch to cross-spawn though, as it's a better fix that works in Node <6 too.

@batjko
Copy link
Author

batjko commented Feb 28, 2017

I'm on Node 6.9.4.

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

No branches or pull requests

5 participants