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

Clean install on Windows 11 fails, using latest node-sass (v7.0.2) - latest as of today 8/Sep/2022 #3299

Closed
joe-oli opened this issue Sep 8, 2022 · 3 comments

Comments

@joe-oli
Copy link

joe-oli commented Sep 8, 2022

Windows 11

node -v
v14.20.0
npm -v
6.14.17

Steps to repo repro:
create new folder c:\test
cd test
npm init -y
npm install node-sass

C:\test>npm install node-sass

node-sass@7.0.2 install C:\test\node_modules\node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v7.0.2/win32-x64-83_binding.node
Download complete
Binary saved to C:\test\node_modules\node-sass\vendor\win32-x64-83\binding.node
Caching binary to C:\Users\cindi.rella\AppData\Roaming\npm-cache\node-sass\7.0.2\win32-x64-83_binding.node

node-sass@7.0.2 postinstall C:\test\node_modules\node-sass
node scripts/build.js

Binary found at C:\test\node_modules\node-sass\vendor\win32-x64-83\binding.node
Testing binary
Binary has a problem: Error: \?\C:\test\node_modules\node-sass\vendor\win32-x64-83\binding.node is not a valid Win32 application.
\?\C:\test\node_modules\node-sass\vendor\win32-x64-83\binding.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at module.exports (C:\test\node_modules\node-sass\lib\binding.js:19:10)
at Object. (C:\test\node_modules\node-sass\lib\index.js:13:35)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32) {
code: 'ERR_DLOPEN_FAILED'
}
Building the binary locally
Building: C:\Program Files\nodejs\node.exe C:\test\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:\Program Files\nodejs\node.exe',
gyp verb cli 'C:\test\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@9.1.0
gyp info using node@14.20.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - "python" is not in PATH or produced an error
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python39\python.exe
gyp verb find Python - executing "C:\Program Files\Python39\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python39\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39-32\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39-32\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python39-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python39-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python39-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python39-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python38\python.exe
gyp verb find Python - executing "C:\Program Files\Python38\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python38\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38-32\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38-32\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python38-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python38-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python38-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python38-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python37\python.exe
gyp verb find Python - executing "C:\Program Files\Python37\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python37\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37-32\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37-32\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python37-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python37-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python37-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python37-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python36\python.exe
gyp verb find Python - executing "C:\Program Files\Python36\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python36\python.exe" could not be run
gyp verb find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36-32\python.exe
gyp verb find Python - executing "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36-32\python.exe" to get version
gyp verb find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files\Python36-32\python.exe
gyp verb find Python - executing "C:\Program Files\Python36-32\python.exe" to get version
gyp verb find Python - "C:\Program Files\Python36-32\python.exe" could not be run
gyp verb find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
gyp verb find Python - executing "C:\Program Files (x86)\Python36-32\python.exe" to get version
gyp verb find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
gyp verb find Python checking if the py launcher can be used to find Python 3
gyp verb find Python - executing "py.exe" to get Python 3 executable path
gyp verb find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39-32\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38-32\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37-32\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36-32\python.exe
gyp ERR! find Python - "C:\Users\cindi.rella\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if the py launcher can be used to find Python 3
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\test\node_modules\node-gyp\lib\find-python.js:330:47)
gyp ERR! stack at PythonFinder.runChecks (C:\test\node_modules\node-gyp\lib\find-python.js:159:21)
gyp ERR! stack at PythonFinder. (C:\test\node_modules\node-gyp\lib\find-python.js:228:18)
gyp ERR! stack at PythonFinder.execFileCallback (C:\test\node_modules\node-gyp\lib\find-python.js:294:16)
gyp ERR! stack at exithandler (child_process.js:390:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:402:5)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:472:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:82:21)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\test\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\test\node_modules\node-sass
gyp ERR! node -v v14.20.0
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@7.0.2 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@7.0.2 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:
npm ERR! C:\Users\cindi.rella\AppData\Roaming\npm-cache_logs\2022-09-08T07_41_23_128Z-debug.log
C:\test>

Where the errors are:
I can verify it is failing in 2 locations::

Downloading binary from https://github.com/sass/node-sass/releases/download/v7.0.2/win32-x64-83_binding.node
Download complete
Binary saved to C:\test\node_modules\node-sass\vendor\win32-x64-83\binding.node
NO LIAR, there is no node-sass folder created inside C:\test\node_modules

Caching binary to C:\Users\cindi.rella\AppData\Roaming\npm-cache\node-sass\7.0.2\win32-x64-83_binding.node
NO LIAR, the file at that location is created with 0 bytes.

@Rafat97
Copy link

Rafat97 commented Sep 8, 2022

Check This #3297

@xzyfer
Copy link
Contributor

xzyfer commented Sep 8, 2022

This should be resolved in v7.0.3.

@xzyfer xzyfer closed this as completed Sep 8, 2022
@joe-oli
Copy link
Author

joe-oli commented Sep 8, 2022

I re-tested after the patched upgrade to 7.0.3, it installed smoothly.
Thank you kindly @xzyfer 👍

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