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

[make serve] make: *** No rule to make target sass, needed by dist/website.css. Stop. #2443

Closed
king7532 opened this issue Mar 29, 2021 · 5 comments

Comments

@king7532
Copy link

Describe the bug
On macOS Big Sur 11.2.3 from fresh git clone, make serve fails:

make: *** No rule to make target `sass', needed by `dist/website.css'.  Stop.

To Reproduce
Steps to reproduce the behavior:

# macOS Big Sur 11.2.3 on MacBook Pro (16-inch, 2019) with Intel CPU
$ sw_vers
ProductName:	macOS
ProductVersion:	11.2.3
BuildVersion:	20D91
# node.js installed from Homebrew -- macOS package manager
$ node --version
v14.12.0
$ npm --version
6.14.8

$ git clone https://github.com/conversejs/converse.js.git
...
$ cd converse.js 
$ git log -1    
commit 65742d32ecdf850727ab51ff3a999c228fe543e6 (HEAD -> master, origin/master, origin/HEAD)
Author: JC Brand <jc@opkode.com>
Date:   Mon Mar 29 13:16:32 2021 +0200

    Move icons template to shared folder

$ make serve
....
make: *** No rule to make target `sass', needed by `dist/website.css'.  Stop.

$ ls -lahp ./node_modules/.bin/node-sass 
lrwxr-xr-x  1 king  staff    26B Mar 29 14:09 ./node_modules/.bin/node-sass -> ../node-sass/bin/node-sass
$ ls -lahp ./node_modules/node-sass/bin/node-sass 
-rwxr-xr-x  1 king  staff    11K Oct 26  1985 ./node_modules/node-sass/bin/node-sass
$ ./node_modules/node-sass/bin/node-sass --version
node-sass	4.14.1	(Wrapper)	[JavaScript]
libsass  	3.5.5	(Sass Compiler)	[C/C++]

Expected behavior
make serve should not produce the above error and should load the dev HTTP server.

Screenshots
N/A

Environment (please complete the following information):

  • macOS Big Sur 11.2.3 on MacBook Pro (16-inch, 2019) with Intel CPU
  • commit 65742d3
@king7532 king7532 changed the title [make serve] make: *** No rule to make target sass', needed by dist/website.css'. Stop. [make serve] make: *** No rule to make target sass, needed by dist/website.css. Stop. Mar 29, 2021
@king7532
Copy link
Author

FYI:

./node_modules/.bin/node-sass also works.

$  ./node_modules/.bin/node-sass --version
node-sass	4.14.1	(Wrapper)	[JavaScript]
libsass  	3.5.5	(Sass Compiler)	[C/C++]

@king7532
Copy link
Author

Here's a patch to fix the Makefile:

diff --git a/Makefile b/Makefile
index fbd054945..ccbcce9fb 100644
--- a/Makefile
+++ b/Makefile
@@ -142,8 +142,8 @@ dist/converse.js:: node_modules
 dist/converse.css:: node_modules
        npm run dev
 
-dist/website.css:: node_modules sass
-       $(SASS) --source-map true --include-path $(BOOTSTRAP) sass/website.scss $@
+dist/website.css:: node_modules
+       $(SASS) --source-map true --include-path $(BOOTSTRAP) src/shared/styles/website.scss $@
 
 dist/website.min.css:: node_modules dist/website.css
        $(CLEANCSS) dist/website.css > $@

@licaon-kter
Copy link
Contributor

I was about to report this, make dist has this issue too, and the minified files are not generated.

The patch above fixes it, do make a PR

@licaon-kter
Copy link
Contributor

licaon-kter commented Apr 8, 2021

@jcbrand that 724a685 fix is not complete as .min.js is not generated for make dist, and an error is outputed at some point:

An output directory must be specified when compiling a directory

make: *** [Makefile:147: dist/website.css] Error 1

make: *** Waiting for unfinished jobs....

But the fix from OP above works fine.

@jcbrand jcbrand reopened this Apr 9, 2021
@jcbrand jcbrand closed this as completed in be9db63 Apr 9, 2021
@jcbrand
Copy link
Member

jcbrand commented Apr 9, 2021

Thanks, I think it's fixed now.

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

No branches or pull requests

3 participants