-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Install node-sass 4.5.0 failed on window 7, "Binary has a problem: Error: %1 is not a valid Win32 application.". #1888
Comments
The problem is that the binary download part way through. So the binary on
disk is faulty. Delete your node_modules and try again.
…On 9 Feb. 2017 8:29 pm, "sdhhqb" ***@***.***> wrote:
After update dependencies in package.json, run "npm install" failed when
installing node-sass. I tried a few times, it seems download
'win32-x64-48_binding.node' always failed.
My node registry is set to cnpm 'http://r.cnpmjs.org/', does it influence
the installation? But I can installed node-sass successfully few weeks ago
when I didn't update dependencies .
Here is my dependencies in package.json.
"dependencies": {
"isomorphic-fetch": "^2.2.1",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"react-router-redux": "^4.0.7",
"redux": "^3.6.0",
"redux-logger": "^2.8.1",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.22.0",
"babel-preset-stage-0": "^6.22.0",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"node-sass": "^4.5.0",
"react-router": "^3.0.2",
"sass-loader": "^5.0.1",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.3.0"
}
The error log.
E:\teach\myLearn>npm install node-sass
npm WARN deprecated ***@***.***: This package is deprecated. Use Object.
assign.
npm WARN prefer global ***@***.*** should be installed with -g
> ***@***.*** install E:\teach\myLearn\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5
.0/win32-x64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win3
2-x64-48_binding.node <https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-48_binding.node>":
ESOCKETTIMEDOUT
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> ***@***.*** postinstall E:\teach\myLearn\node_modules\node-sass
> node scripts/build.js
Binary found at E:\teach\myLearn\node_modules\node-sass\vendor\win32-x64-48\bind
ing.node
Testing binary
Binary has a problem: Error: %1 is not a valid Win32 application.
\\?\E:\teach\myLearn\node_modules\node-sass\vendor\win32-x64-48\binding.node
at Error (native)
at Object.Module._extensions..node (module.js:583:18)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at module.exports (E:\teach\myLearn\node_modules\node-sass\lib\binding.js:19
:10)
at Object.<anonymous> (E:\teach\myLearn\node_modules\node-sass\lib\index.js:
14:35)
at Module._compile (module.js:556:32)
Building the binary locally
Building: C:\Program Files\nodejs\node.exe E:\teach\myLearn\node_modules\node-gy
p\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_l
dflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'E:\\teach\\myLearn\\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 info using ***@***.***
gyp info using ***@***.*** | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\teach\myLearn\node_modules\w
hich\which.js:13:12)
gyp verb `which` failed at F (E:\teach\myLearn\node_modules\which\which.js:6
8:19)
gyp verb `which` failed at E (E:\teach\myLearn\node_modules\which\which.js:8
0:29)
gyp verb `which` failed at E:\teach\myLearn\node_modules\which\which.js:89:1
6
gyp verb `which` failed at E:\teach\myLearn\node_modules\isexe\index.js:44:5
gyp verb `which` failed at E:\teach\myLearn\node_modules\isexe\windows.js:29
:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\teach\myLearn\node_modules\w
hich\which.js:13:12)
gyp verb `which` failed at F (E:\teach\myLearn\node_modules\which\which.js:6
8:19)
gyp verb `which` failed at E (E:\teach\myLearn\node_modules\which\which.js:8
0:29)
gyp verb `which` failed at E:\teach\myLearn\node_modules\which\which.js:89:1
6
gyp verb `which` failed at E:\teach\myLearn\node_modules\isexe\index.js:44:5
gyp verb `which` failed at E:\teach\myLearn\node_modules\isexe\windows.js:29
:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15) code: 'ENOENT
' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\python27\python.EXE
gyp verb check python version `C:\python27\python.EXE -c "import platform; print
(platform.python_version());"` returned: "2.7.11\r\n"
gyp verb get node dir no --target version specified, falling back to host node v
ersion: 6.7.0
gyp verb command install [ '6.7.0' ]
gyp verb install input version string "6.7.0"
gyp verb install installing version: 6.7.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 6.7.0
gyp verb build dir attempting to create "build" dir: E:\teach\myLearn\node_modul
es\node-sass\build
gyp verb build dir "build" dir needed to be created? E:\teach\myLearn\node_modul
es\node-sass\build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: E:\teach\myLearn\node_module
s\node-sass\build\config.gypi
gyp verb config.gypi checking for gypi file: E:\teach\myLearn\node_modules\node-
sass\config.gypi
gyp verb common.gypi checking for gypi file: E:\teach\myLearn\node_modules\node-
sass\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\python27\python.EXE
gyp info spawn args [ 'E:\\teach\\myLearn\\node_modules\\node-gyp\\gyp\\gyp_main
.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'E:\\teach\\myLearn\\node_modules\\node-sass\\build\\confi
g.gypi',
gyp info spawn args '-I',
gyp info spawn args 'E:\\teach\\myLearn\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\Administrator\\.node-gyp\\6.7.0\\include\\node
\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\Administrator\\.node-gyp\\6.7.
0',
gyp info spawn args '-Dnode_gyp_dir=E:\\teach\\myLearn\\node_modules\\node-gyp
',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=E:\\teach\\myLearn\\node_modules\\node-
sass',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'E:\\teach\\myLearn\\node_modules\\node-sass\\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\Administrator\.node-gyp\6.7.0
gyp verb found first Solution file build/binding.sln
gyp verb could not find "msbuild.exe" in PATH - finding location in registry
gyp verb "Release" dir needed to be created? null
gyp verb copying "node.lib" for x64 C:\Users\Administrator\.node-gyp\6.7.0\Relea
se\node.lib
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2017/2/9 16:53:05。
节点 1 上的项目“E:\teach\myLearn\node_modules\node-sass\build\binding.sln”(默
认目标)。
ValidateSolutionConfiguration:
正在生成解决方案配置“Release|x64”。
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,
1) 安装 .NET Fram
ework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了
其他位置,请将其位置添加到系统
路径中。 [E:\teach\myLearn\node_modules\node-sass\build\binding.sln]
已完成生成项目“E:\teach\myLearn\node_modules\node-sass\build\binding.sln”(默认
目标)的操作 - 失
败。
生成失败。
“E:\teach\myLearn\node_modules\node-sass\build\binding.sln”(默认目标) (1) ->
(_src_\libsass 目标) ->
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题
,1) 安装 .NET Fr
amework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到
了其他位置,请将其位置添加到
系统路径中。 [E:\teach\myLearn\node_modules\node-sass\build\binding.sln]
0 个警告
1 个错误
已用时间 00:00:00.05
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (E:\teach\myLearn\node_modules\node-gy
p\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\teach\\myLearn\\node
_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--
libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\teach\myLearn\node_modules\node-sass
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fseve
***@***.***
npm WARN ***@***.*** requires a peer of webpack@^1.9.11 bu
t none was installed.
npm WARN ***@***.*** No description
npm WARN ***@***.*** No repository field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "node-sass"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! ***@***.*** postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ***@***.*** postinstall script 'node scripts/build.js
'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\teach\myLearn\npm-debug.log
When reporting an bug, *you must provide this information*:
- NPM version (npm -v):
3.10.3
- Node version (node -v):
6.7.0
- Node Process (node -p process.versions):
{ http_parser: '2.7.0
node: '6.7.0',
v8: '5.1.281.83',
uv: '1.9.1',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '57.1',
modules: '48',
openssl: '1.0.2j' }
- Node Platform (node -p process.platform):
win32
- Node architecture (node -p process.arch):
x64
- node-sass version (node -p "require('node-sass').info"):
module.js:583
return process.dlopen(module, path._makeLong(filename));
^
Error: The process cannot access the file because it is being used by
another pr
ocess.
\?\E:\teach\myLearn\node_modules\node-sass\vendor\
win32-x64-48\binding.node
at Error (native)
at Object.Module._extensions..node (module.js:583:18)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at module.exports (E:\teach\myLearn\node_modules\node-sass\lib\binding.
js:19
:10)
at Object. (E:\teach\myLearn\node_modules\node-sass\lib\index.js:
14:35)
at Module._compile (module.js:556:32)
- npm node-sass versions (npm ls node-sass):
***@***.*** E:\teach\myLearn
+-- ***@***.***
`-- UNMET PEER DEPENDENCY ***@***.***
npm ERR! peer dep missing: webpack@^1.9.11, required by
extract-text-webpack-plu
***@***.***
When encountering a syntax, or compilation issue:
- Open an issue on LibSass <https://github.com/sass/LibSass/issues/new>.
You
may link it back here, but any change will be required there, not here
*If you delete this text without following it, your issue will be closed.*
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1888>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWAx2UB1Ar_Pieff9NsZuOEOlas1aks5ratxogaJpZM4L75BP>
.
|
Same here on Windows 10 (CMD)
try to reinstall many times, but it doesn't work
|
I have found a solution. After installed failed, a Then I can install |
+1
then i install it offline |
Getting the same issue on Windows 8 x64. EDIT: Working now. Just grab the binding.node file. |
@sdhhqb put |
Getting the same issue on Windows 10 x64. |
As work around run |
Currently the binary download is streamed to disk once a 200 response has been recieved. When an error occurs during the download a partially downloaded binary is left on disk. Subsequent installs see the binary and bail out of re-downloading it. Worse yet those subsequent installs move the binary into the global cache so even removing node_modules will not remove the broken binary. With this patch the binary is only flushed to disk once it has been fully downloaded. Fixes sass#1882 Fixes sass#1888
Currently the binary download is streamed to disk once a 200 response has been recieved. When an error occurs during the download a partially downloaded binary is left on disk. Subsequent installs see the binary and bail out of re-downloading it. Worse yet those subsequent installs move the binary into the global cache so even removing node_modules will not remove the broken binary. With this patch the binary is only flushed to disk once it has been fully downloaded. Fixes sass#1882 Fixes sass#1888
Ok here is what worked for me.
|
Thank you @xzyfer, this works for me
|
Hey thank you @pizdetss its working now |
i worked with |
@pizdetss, it works for me on Win7, thanks |
@sdhhqb oh my goodness, thank you baby jesus . I have been trying to get past this issue for hours, you saved me! |
Why is this issue closed? No reference to a working solution? I just got this after trying to update my application from Node-4.2.2 to latest LTS. No idea how to solve this on a project with more than hundred dependencies. It seemed to work without Python on Node-4.2.2, what has changed now? |
Delete your node_modules, clear your npm caches, and npm install
…On 4 Jul. 2017 8:50 pm, "Daniel Sundberg" ***@***.***> wrote:
Why is this issue closed?
I just got this after trying to update my application from Node-4.2.2 to
latest LTS. No idea how to solve this on a project with more than hundred
dependencies.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1888 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWLJvk9uRJ6QO8tKOFmkww4FyndoJks5sKhi0gaJpZM4L75BP>
.
|
@xzyfer yes done that, doesn't work. Seem to work in a clean directory though, so it looks like a dependency problem of some kind. Edit:
So it looks like the problem is that the install script expect the url above to work but it doesn't. Probably removed since it's a really old release? I still think it's a problem since the error message is kind of hidden for the end user. |
Yes, 3.6.0 doesn't have official Node 6 support https://github.com/sass/node-sass/releases/tag/v3.6.0 |
@nschonni, yes I realize that. However, I don't like to change more than one variable at a time so I started with updating node version. Now I changed strategy and start with updating dependencies instead. |
I had same issue for node-sass@4.5.3. Downloading win32-x64-48_binding.node manually and putting it in C:\Users\Administrator\AppData\Roaming\npm-cache\node-sass\4.5.3 folder fixed the issue. |
I had the same issue on WIn7 x64 and I have downloaded as others have mentioned |
Is that (on the website https://github.com/sass/node-sass-binaries/)
the current version? Updated one year ago and still release candidate ? thank you for your feedbacks,.. |
Currently the binary download is streamed to disk once a 200 response has been recieved. When an error occurs during the download a partially downloaded binary is left on disk. Subsequent installs see the binary and bail out of re-downloading it. Worse yet those subsequent installs move the binary into the global cache so even removing node_modules will not remove the broken binary. With this patch the binary is only flushed to disk once it has been fully downloaded. Fixes sass#1882 Fixes sass#1888
Currently the binary download is streamed to disk once a 200 response has been recieved. When an error occurs during the download a partially downloaded binary is left on disk. Subsequent installs see the binary and bail out of re-downloading it. Worse yet those subsequent installs move the binary into the global cache so even removing node_modules will not remove the broken binary. With this patch the binary is only flushed to disk once it has been fully downloaded. Fixes #1882 Fixes #1888
After update dependencies in package.json, run "npm install" failed when installing node-sass. I tried a few times, it seems download 'win32-x64-48_binding.node' always failed.
My node registry is set to cnpm 'http://r.cnpmjs.org/', does it influence the installation? But I can installed node-sass successfully few weeks ago when I didn't update dependencies .
Here is my dependencies in package.json.
The error log.
When reporting an bug, you must provide this information:
npm -v
):3.10.3
node -v
):6.7.0
node -p process.versions
):{ http_parser: '2.7.0
node: '6.7.0',
v8: '5.1.281.83',
uv: '1.9.1',
zlib: '1.2.8',
ares: '1.10.1-DEV',
icu: '57.1',
modules: '48',
openssl: '1.0.2j' }
node -p process.platform
):win32
node -p process.arch
):x64
node -p "require('node-sass').info"
):module.js:583
return process.dlopen(module, path._makeLong(filename));
^
Error: The process cannot access the file because it is being used by another pr
ocess.
\?\E:\teach\myLearn\node_modules\node-sass\vendor\win32-x64-48\binding.node
at Error (native)
at Object.Module._extensions..node (module.js:583:18)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at module.exports (E:\teach\myLearn\node_modules\node-sass\lib\binding.js:19
:10)
at Object. (E:\teach\myLearn\node_modules\node-sass\lib\index.js:
14:35)
at Module._compile (module.js:556:32)
npm ls node-sass
):myLearn@1.0.0 E:\teach\myLearn
+-- node-sass@4.5.0
`-- UNMET PEER DEPENDENCY webpack@2.2.1
npm ERR! peer dep missing: webpack@^1.9.11, required by extract-text-webpack-plu
gin@1.0.1
When encountering a syntax, or compilation issue:
LibSass
. Youmay link it back here, but any change will be required there, not here
If you delete this text without following it, your issue will be closed.
The text was updated successfully, but these errors were encountered: