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

Replace node-sass with a portable sass to support old compilers #110

Closed
tokuhirom opened this issue Jan 18, 2022 · 3 comments
Closed

Replace node-sass with a portable sass to support old compilers #110

tokuhirom opened this issue Jan 18, 2022 · 3 comments
Labels

Comments

@tokuhirom
Copy link
Contributor

When I build JIFA on centos7, I got the following error.

8195 error gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
8195 error g++: error: unrecognized command line option ‘-std=gnu++14’
8195 error make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 1
8195 error gyp ERR! build error
8195 error gyp ERR! stack Error: `make` failed with exit code: 2
8195 error gyp ERR! stack     at ChildProcess.onExit (/home/tokuhirom/jifa/frontend/node_modules/node-gyp/lib/build.js:262:23)
8195 error gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
8195 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
8195 error gyp ERR! System Linux 3.10.0-1160.11.1.el7.x86_64
8195 error gyp ERR! command "/usr/bin/node" "/home/tokuhirom/jifa/frontend/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
8195 error gyp ERR! cwd /home/tokuhirom/jifa/frontend/node_modules/node-sass
8195 error gyp ERR! node -v v16.13.2
8195 error gyp ERR! node-gyp -v v3.8.0
8195 error gyp ERR! not ok

I guess, node-sass doesn't support the old compilers.
ref. sass/node-sass#483

And now node-sass is deprecated. It has been replaced by the more portable dart-sass.
https://sass-lang.com/blog/libsass-is-deprecated

If my understanding is correct, the following patch may resolve the issue.

diff --git NOTICE NOTICE
index bed6224..575a1e9 100644
--- NOTICE
+++ NOTICE
@@ -106,7 +106,7 @@ jquery (3.4.1)

 * License: MIT

-node-sass (4.14.0)
+sass (1.48.0)

 * License: MIT

diff --git frontend/package.json frontend/package.json
index aa892a1..b31f5ec 100644
--- frontend/package.json
+++ frontend/package.json
@@ -17,7 +17,7 @@
     "element-ui": "^2.13.1",
     "font-awesome": "^4.7.0",
     "jquery": "^3.4.1",
-    "node-sass": "^4.14.0",
+    "sass": "^1.48.0",
     "popper.js": "^1.15.0",
     "sass-loader": "^7.1.0",
     "tar": "^4.4.8",
@D-D-H
Copy link
Contributor

D-D-H commented Jan 19, 2022

sass/node-sass#2952

@D-D-H
Copy link
Contributor

D-D-H commented Jan 19, 2022

Thank you for reporting this. Could you file a PR to fix it?

@D-D-H D-D-H added the build label Jan 19, 2022
@D-D-H
Copy link
Contributor

D-D-H commented Jan 20, 2022

fixed: b8907d7

@D-D-H D-D-H closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants