Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

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

Open
ali0707 opened this issue Jan 15, 2024 · 2 comments

Comments

@ali0707
Copy link

ali0707 commented Jan 15, 2024

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 [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 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.

[email protected] 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

[email protected] 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 [email protected]
gyp info using [email protected] | 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 [email protected] No repository field.
npm WARN [email protected] No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

This comment has been minimized.

@nex3
Copy link
Contributor

nex3 commented Jul 18, 2024

Node Sass is deprecated, and this issue is unlikely to ever be fixed. Please move your Sass compilation to the sass package instead.

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

No branches or pull requests

3 participants