sass / node-sass

:rainbow: Node.js bindings to libsass
https://npmjs.org/package/node-sass
MIT License
8.5k stars 1.33k forks source link

Issue Installing node-sass in Angular Project with Specific Angular and Node Versions #3389

Open ali0707 opened 5 months ago

ali0707 commented 5 months ago

Hi, I'm currently facing an issue while attempting to install node-sass in my Angular project. I've tried several versions of node-sass, but unfortunately, I haven't been successful. Here are the Angular versions I'm working with, as shown in the picture below: [Include a screenshot or list the Angular versions] Additionally, I'd like to use Node.js version 10 for my project. Could you please provide guidance or suggest a compatible version of node-sass that works seamlessly with the specified Angular versions and Node.js version 10? Your assistance in resolving this matter is greatly appreciated. Thank you.

here is the code : /*/

PS C:\Users\myname\f1-front> node --version v13.14.0 PS C:\Users\myname\f1-front> npm i node-sass@4.13.1 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

node-sass@4.13.1 install C:\Users\myname\f1-front\node_modules\node-sass node scripts/install.js

Cached binary found at C:\Users\myname\AppData\Roaming\npm-cache\node-sass\4.13.1\win32-x64-79_binding.node

node-sass@4.13.1 postinstall C:\Users\myname\f1-front\node_modules\node-sass node scripts/build.js

Binary found at C:\Users\myname\f1-front\node_modules\node-sass\vendor\win32-x64-79\binding.node Testing binary Binary has a problem: Error: \?\C:\Users\myname\f1-front\node_modules\node-sass\vendor\win32-x64-79\binding.node is not a valid Win32 application. \?\C:\Users\myname\f1-front\node_modules\node-sass\vendor\win32-x64-79\binding.node at Object.Module._extensions..node (internal/modules/cjs/loader.js:1168:18) at Module.load (internal/modules/cjs/loader.js:982:32) at Function.Module._load (internal/modules/cjs/loader.js:875:14) at Module.require (internal/modules/cjs/loader.js:1022:19) at require (internal/modules/cjs/helpers.js:72:18) at module.exports (C:\Users\myname\f1-front\node_modules\node-sass\lib\binding.js:19:10) at Object. (C:\Users\myname\f1-front\node_modules\node-sass\lib\index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:1118:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10) at Module.load (internal/modules/cjs/loader.js:982:32) Building the binary locally Building: C:\NWLS\nodejs\node-v13.14.0-win-x64\node.exe C:\Users\myname\f1-front\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\NWLS\nodejs\node-v13.14.0-win-x64\node.exe', gyp verb cli 'C:\Users\myname\f1-front\node_modules\node-gyp\bin\node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' gyp verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@13.14.0 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "C:\NWLS\Python\Python27" in the PATH gyp verb which failed Error: not found: C:\NWLS\Python\Python27 gyp verb which failed at getNotFoundError (C:\Users\myname\f1-front\node_modules\which\which.js:13:12) gyp verb which failed at F (C:\Users\myname\f1-front\node_modules\which\which.js:68:19) gyp verb which failed at E (C:\Users\myname\f1-front\node_modules\which\which.js:80:29) gyp verb which failed at C:\Users\myname\f1-front\node_modules\which\which.js:89:16 gyp verb which failed at C:\Users\myname\f1-front\node_modules\isexe\index.js:42:5 gyp verb which failed at C:\Users\myname\f1-front\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqCallback.oncomplete (fs.js:171:21) gyp verb which failed C:\NWLS\Python\Python27 Error: not found: C:\NWLS\Python\Python27 gyp verb which failed at getNotFoundError (C:\Users\myname\f1-front\node_modules\which\which.js:13:12) gyp verb which failed at F (C:\Users\myname\f1-front\node_modules\which\which.js:68:19) gyp verb which failed at E (C:\Users\myname\f1-front\node_modules\which\which.js:80:29) gyp verb which failed at C:\Users\myname\f1-front\node_modules\which\which.js:89:16 gyp verb which failed at C:\Users\myname\f1-front\node_modules\isexe\index.js:42:5 gyp verb which failed at C:\Users\myname\f1-front\node_modules\isexe\windows.js:36:5 gyp verb which failed at FSReqCallback.oncomplete (fs.js:171:21) { gyp verb which failed code: 'ENOENT' gyp verb which failed } gyp verb could not find "C:\NWLS\Python\Python27". checking python launcher gyp verb could not find "C:\NWLS\Python\Python27". guessing location gyp verb ensuring that file exists: C:\Python27\python.exe gyp verb check python version C:\Python27\python.exe -c "import sys; print "2.7.15 gyp verb check python version .%s.%s" % sys.version_info[:3];" returned: %j gyp verb get node dir no --target version specified, falling back to host node version: 13.14.0 gyp verb command install [ '13.14.0' ] gyp verb install input version string "13.14.0" gyp verb install installing version: 13.14.0 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version not already installed, continuing with install 13.14.0 gyp verb ensuring nodedir is created C:\Users\myname.node-gyp\13.14.0 gyp verb created nodedir C:\Users\myname.node-gyp\13.14.0 gyp http GET https://nodejs.org/download/release/v13.14.0/node-v13.14.0-headers.tar.gz gyp WARN install got an error, rolling back install gyp verb command remove [ '13.14.0' ] gyp verb remove using node-gyp dir: C:\Users\myname.node-gyp gyp verb remove removing target version: 13.14.0 gyp verb remove removing development files for version: 13.14.0 gyp ERR! configure error gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad gyp ERR! stack network settings. gyp ERR! stack at Request. (C:\Users\myname\f1-front\node_modules\node-gyp\lib\install.js:197:21) gyp ERR! stack at Request.emit (events.js:315:20) gyp ERR! stack at Request.onRequestError (C:\Users\myname\f1-front\node_modules\request\request.js:877:8) gyp ERR! stack at ClientRequest.emit (events.js:315:20) gyp ERR! stack at TLSSocket.socketErrorListener (_http_client.js:432:9) gyp ERR! stack at TLSSocket.emit (events.js:315:20) gyp ERR! stack at emitErrorNT (internal/streams/destroy.js:84:8) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21) gyp ERR! System Windows_NT 10.0.19045 gyp ERR! command "C:\NWLS\nodejs\node-v13.14.0-win-x64\node.exe" "C:\Users\myname\f1-front\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd C:\Users\myname\f1-front\node_modules\node-sass gyp ERR! node -v v13.14.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN f1_x_fe_fr@1.13.0 No repository field. npm WARN f1_x_fe_fr@1.13.0 No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.13.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.13.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

/*/

angular

kylanhurt commented 3 months ago

Yeah installing node-sass always seems to be a big pain. Really disappointing from this dev team.