Node-sass: Install node-sass 4.5.0 failed on window 7, "Binary has a problem: Error: %1 is not a valid Win32 application.".

Created on 9 Feb 2017  ·  22Comments  ·  Source: sass/node-sass

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 [email protected]: This package is deprecated. Use Object.
assign.
npm WARN prefer global [email protected] should be installed with -g

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

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

> [email protected] 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 [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 "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
[email protected]
npm WARN [email protected] requires a peer of webpack@^1.9.11 bu
t none was installed.
npm WARN [email protected] No description
npm WARN [email protected] 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! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:teachmyLearnnode_modulesnode-sassvendorwin32-x64-48binding.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:teachmyLearnnode_modulesnode-sasslibbinding.js:19
:10)
at Object. (E:teachmyLearnnode_modulesnode-sasslibindex.js:
14:35)
at Module._compile (module.js:556:32)

npm ERR! peer dep missing: webpack@^1.9.11, required by extract-text-webpack-plu
[email protected]

When encountering a syntax, or compilation issue:

If you delete this text without following it, your issue will be closed.

Most helpful comment

I have found a solution.

After installed failed, a node-sass\4.5.0 folder is still created in npm-cache folder. So I download win32-x64-48_binding.node manually, put it in C:\Users\Administrator\AppData\Roaming\npm-cache\node-sass\4.5.0 folder.

Then I can install node-sass successfully.

All 22 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" notifications@github.com 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:teachmyLearn>npm install node-sass
npm WARN deprecated lodash.[email protected]: This package is deprecated. Use Object.
assign.
npm WARN prefer global [email protected] should be installed with -g

[email protected] install E:teachmyLearnnode_modulesnode-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

[email protected] postinstall E:teachmyLearnnode_modulesnode-sass
node scripts/build.js

Binary found at E:teachmyLearnnode_modulesnode-sassvendorwin32-x64-48bind
ing.node
Testing binary
Binary has a problem: Error: %1 is not a valid Win32 application.
\?E:teachmyLearnnode_modulesnode-sassvendorwin32-x64-48binding.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:teachmyLearnnode_modulesnode-sasslibbinding.js:19
:10)
at Object. (E:teachmyLearnnode_modulesnode-sasslibindex.js:
14:35)
at Module._compile (module.js:556:32)
Building the binary locally
Building: C:Program Filesnodejsnode.exe E:teachmyLearnnode_modulesnode-gy
pbinnode-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 [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 "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (E:teachmyLearnnode_modulesw
hichwhich.js:13:12)
gyp verb which failed at F (E:teachmyLearnnode_moduleswhichwhich.js:6
8:19)
gyp verb which failed at E (E:teachmyLearnnode_moduleswhichwhich.js:8
0:29)
gyp verb which failed at E:teachmyLearnnode_moduleswhichwhich.js:89:1
6
gyp verb which failed at E:teachmyLearnnode_modulesisexeindex.js:44:5

gyp verb which failed at E:teachmyLearnnode_modulesisexewindows.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:teachmyLearnnode_modulesw
hichwhich.js:13:12)
gyp verb which failed at F (E:teachmyLearnnode_moduleswhichwhich.js:6
8:19)
gyp verb which failed at E (E:teachmyLearnnode_moduleswhichwhich.js:8
0:29)
gyp verb which failed at E:teachmyLearnnode_moduleswhichwhich.js:89:1
6
gyp verb which failed at E:teachmyLearnnode_modulesisexeindex.js:44:5

gyp verb which failed at E:teachmyLearnnode_modulesisexewindows.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:python27python.EXE
gyp verb check python version C:\python27\python.EXE -c "import platform; print (platform.python_version());" returned: "2.7.11rn"
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:teachmyLearnnode_modul
esnode-sassbuild
gyp verb build dir "build" dir needed to be created? E:teachmyLearnnode_modul
esnode-sassbuild
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: E:teachmyLearnnode_module
snode-sassbuildconfig.gypi
gyp verb config.gypi checking for gypi file: E:teachmyLearnnode_modulesnode-
sassconfig.gypi
gyp verb common.gypi checking for gypi file: E:teachmyLearnnode_modulesnode-
sasscommon.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:python27python.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:UsersAdministrator.node-gyp6.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:UsersAdministrator.node-gyp6.7.0Relea
senode.lib
gyp info spawn C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.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:teachmyLearnnode_modulesnode-sassbuildbinding.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:teachmyLearnnode_modulesnode-sassbuildbinding.sln]
已完成生成项目“E:teachmyLearnnode_modulesnode-sassbuildbinding.sln”(默认
目标)的操作 - 失
败。

生成失败。

“E:teachmyLearnnode_modulesnode-sassbuildbinding.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:teachmyLearnnode_modulesnode-sassbuildbinding.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:teachmyLearnnode_modulesnode-gy
plibbuild.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:teachmyLearnnode_modulesnode-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
[email protected]
npm WARN [email protected] requires a peer of webpack@^1.9.11 bu
t none was installed.
npm WARN [email protected] No description
npm WARN [email protected] 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! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:teachmyLearnnpm-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:teachmyLearnnode_modulesnode-sassvendor
win32-x64-48binding.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:teachmyLearnnode_modulesnode-sasslibbinding.
js:19
:10)
at Object. (E:teachmyLearnnode_modulesnode-sasslibindex.js:
14:35)
at Module._compile (module.js:556:32)

npm ERR! peer dep missing: webpack@^1.9.11, required by
extract-text-webpack-plu
[email protected]

When encountering a syntax, or compilation issue:

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
https://github.com/sass/node-sass/issues/1888, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWAx2UB1Ar_Pieff9NsZuOEOlas1aks5ratxogaJpZM4L75BP
.

Same here on Windows 10 (CMD)

ERROR in %1 is not a valid Win32 application.
\\?\C:\Users\i\projects\bragi\node_modules\node-sass\vendor\win32-x64-51\binding.node
 @ ./src/views/settings/playlog.module.css 4:14-191 13:2-17:4 14:20-197

try to reinstall many times, but it doesn't work

λ node --version
v7.5.0

I have found a solution.

After installed failed, a node-sass\4.5.0 folder is still created in npm-cache folder. So I download win32-x64-48_binding.node manually, put it in C:\Users\Administrator\AppData\Roaming\npm-cache\node-sass\4.5.0 folder.

Then I can install node-sass successfully.

+1
i have tried many times,but still error

Binary found at D:\application\demo\node_modules\node-sass\vendor\win32-x64-48\binding.node
Testing binary
Binary has a problem: Error: %1 is not a valid Win32 application.
\\?\D:\application\demo\node_modules\node-sass\vendor\win32-x64-48\binding.node

then i install it offline

Getting the same issue on Windows 8 x64.

EDIT: Working now. Just grab the binding.node file.

@sdhhqb put win32-x64-48_binding.node into npm-cache, it can work by using npm, but not yarn

Getting the same issue on Windows 10 x64.
"node-sass": "^4.5.0"

As work around run npm cache clean.

Ok here is what worked for me.

  1. Download the binary file and put into temp directory
  2. Set the sass binary path in CMD: SET SASS_BINARY_PATH=C:/temp/win32-x64-51_binding.node
    For bash/powershell (https://github.com/sass/node-sass/issues/1106#issuecomment-134559641)
  3. npm install node-sass

Thank you @xzyfer, this works for me

$ npm cache clean && npm install node-sass

Hey thank you @Pizdetss its working now

i worked with cnpm install

@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" notifications@github.com 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
https://github.com/sass/node-sass/issues/1888#issuecomment-312847552,
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:
Manually downloading the binary and adding it from command line did it for me. I did:

  • Check error message for missing binary
    ````

[email protected] install C:CodeCorewebCoreInsatsSourceInsatsrapportWebnode_modulesnode-sass
node scripts/install.js

Cannot download "https://github.com/sass/node-sass/releases/download/v3.6.0/win32-x64-48_binding.node":

HTTP error 404 Not Found

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

````

  • Went to https://github.com/sass/node-sass/releases/download/v4.5.3/win32-x64-48_binding.node and downloaded the binary manually (just put it in my download directory)
  • Then I could install node-sass with command line parameter:
    npm install node-sass --sass-binary-path="C:\\Users\\myuser\\Downloads\\win32-x64-48_binding.node"
  • Using env variable like above did not work for me, might be front slashes or some other windows issue

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
You should update if you want to use that version of Node

@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 [email protected]. Downloading win32-x64-48_binding.node manually and putting it in C:UsersAdministratorAppDataRoamingnpm-cachenode-sass4.5.3 folder fixed the issue.

I had the same issue on WIn7 x64 and I have downloaded as others have mentioned https://github.com/sass/node-sass-binaries/blob/master/win32-x64-48_binding.node
and place it inside C:Usersnpm-cachenode-sass4.5.5 folder fixed the issue.
I did find the location of my cache by running : npm cofig list

Is that (on the website https://github.com/sass/node-sass-binaries/)

win32-x64-48_binding.node   Windows, Linux, and OSX binaries for LibSass 3.4.0-RC1  

the current version? Updated one year ago and still release candidate ?

thank you for your feedbacks,..

Was this page helpful?
0 / 5 - 0 ratings