node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

node-sass: No input file was found

Open spa46 opened this issue 10 years ago • 6 comments

Hi. I was using node-sass to make css from _scss directory.

Therefore, I typed appropriate command but it says no input file was found.

node-sass assets/_scss --output-style compressed -o assets/css
 No input file was found.

I read the usage guide of node-sass cli carefully, tried with different combinations but the same result. source directory contains multiple folder of .scss files and this goes to target file assets/css/main.css. Do I need some steps to run node-sass or is it a bug?

C:\>node -v
v4.3.2

C:\>npm -v
2.14.12

C:\>node-sass -v
node-sass       3.6.0   (Wrapper)       [JavaScript]
libsass         3.3.6   (Sass Compiler) [C/C++]

spa46 avatar Apr 29 '16 09:04 spa46

Whats the result of ls asstets/_scss? On 29 Apr 2016 7:49 PM, "Sean Se-Chang Park" [email protected] wrote:

Hi. I was using node-sass to make css from _scss directory.

Therefore, I typed appropriate command but it says no input file was found.

node-sass assets/_scss --output-style compressed -o assets/css No input file was found.

I read the usage guide of node-sass cli carefully, tried with different combinations but the same result. source directory contains multiple folder of .scss files and this goes to target file assets/css/main.css. Do I need some steps to run node-sass or is it a bug?

C:>node -v v4.3.2

C:>npm -v 2.14.12

C:>node-sass -v node-sass 3.6.0 (Wrapper) [JavaScript] libsass 3.3.6 (Sass Compiler) [C/C++]

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/sass/node-sass/issues/1505

xzyfer avatar Apr 29 '16 12:04 xzyfer

As I am running this on Windows 7, dir assets_scss gives:

C:\> dir assets\_scss

2016-04-28  11:28    <DIR>          .
2016-04-28  11:28    <DIR>          ..
2016-04-28  11:28               685 main.scss
2016-04-28  11:28    <DIR>          vendor
2016-04-28  11:28               261 _animations.scss
2016-04-28  11:28             4,365 _archive.scss
2016-04-28  11:28             4,889 _base.scss
2016-04-28  11:28             2,857 _buttons.scss
2016-04-28  11:28             1,233 _footer.scss
2016-04-28  11:28             5,851 _forms.scss
2016-04-28  11:28             1,050 _masthead.scss
2016-04-28  11:28             1,093 _mixins.scss
2016-04-28  11:28             8,102 _navigation.scss
2016-04-28  11:28             1,904 _notices.scss
2016-04-28  11:28             5,430 _page.scss
2016-04-28  11:28               440 _print.scss
2016-04-28  11:28             3,597 _reset.scss
2016-04-28  11:28             4,115 _sidebar.scss
2016-04-28  11:28             5,444 _syntax.scss
2016-04-28  11:28               757 _tables.scss
2016-04-28  11:28             6,848 _utilities.scss
2016-04-28  11:28             4,858 _variables.scss

spa46 avatar Apr 29 '16 13:04 spa46

I am having the same issue, though I am running on El Capitan. An ls of my directory shows scss files as expected. I ran both from the command line and via an npm script.

UPDATE: I got more useful troubleshooting information (more precise error messages) when I tried an alternate method of compiling with node-sass (via the build tasks in Visual Studio Code). The bottom line is that the right binary for node bindings was not present because I had not re-run an npm install after I upgraded Node.

Additionally I needed to run npm rebuild node-sass and then everything started working perfectly.

tldr:

run npm install npm rebuild node-sass

HTH

glitchbane avatar May 08 '16 19:05 glitchbane

One thing to try would be making sure the input directory is the last parameter. On 9 May 2016 5:08 AM, "Sheila Leverson" [email protected] wrote:

I am having the same issue, though I am running on El Capitan. An ls of my directory shows scss files as expected. I ran both from the command line and via an npm script.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/sass/node-sass/issues/1505#issuecomment-217740065

xzyfer avatar May 08 '16 23:05 xzyfer

It has already passed 4 years, but if anybody is still looking for the answer: in folder-mode node-sass does not compile file whose filename starts with underscore (_).

So renaming files helped me: some/folder/_scss-file.scss => some/folder/scss-file.scss

ababashka avatar Jun 29 '20 13:06 ababashka

huh @ababashka yes, that works for me. surprised this is a thing

JackHowa avatar Oct 09 '20 15:10 JackHowa