[email protected]: [Windows Error ] %1 is not a valid win32 application

0

windows_8__running_

Subash picture Subash  ·  17 Oct 2014

Most helpful comment

28

I have met this problem before.
And I refreshed my node.js.
then
npm install node-sass
It's done.

Or you can try
npm rm node-sass
npm install node-sass

daisyHawen picture daisyHawen  ·  1 Jul 2016

All comments

0

Full Log,

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Subash>npm install node-sass
-
> [email protected] install C:\Users\Subash\node_modules\node-sass
> node build.js

`win32-x64-v8-3.14` exists; testing

C:\Users\Subash\node_modules\node-sass>node "C:\Program Files\nodejs\node_module
s\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack     at Object.oncomplete (evalmachine.<anonymous>:107:15)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Subash\node_modules\node-sass
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
Build failed

npm ERR! [email protected] install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! 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 build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sass"
npm ERR! cwd C:\Users\Subash
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

C:\Users\Subash>node
> require('node-sass')
Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at repl:1:2
    at REPLServer.self.eval (repl.js:110:21)
    at Interface.<anonymous> (repl.js:239:12)
    at Interface.emit (events.js:95:17)
    at Interface._onLine (readline.js:202:10)
    at Interface._line (readline.js:531:8)
>
(^C again to quit)
>

C:\Users\Subash>npm install node-sass --ignore-scripts
[email protected] node_modules\node-sass
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], supports-color@0
.2.0, [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], commander
@2.3.0, [email protected], [email protected], [email protected])

C:\Users\Subash>node
> require('node-sass')
Error: %1 is not a valid Win32 application.
C:\Users\Subash\node_modules\node-sass\bin\win32-x64-v8-3.14\binding.node
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at requireBinding (C:\Users\Subash\node_modules\node-sass\sass.js:18:14)
    at Object.<anonymous> (C:\Users\Subash\node_modules\node-sass\sass.js:25:15)

    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
> process.versions
{ http_parser: '1.0',
  node: '0.10.32',
  v8: '3.14.5.9',
  ares: '1.9.0-DEV',
  uv: '0.10.28',
  zlib: '1.2.3',
  modules: '11',
  openssl: '1.0.1i' }
>
Subash picture Subash  ·  17 Oct 2014
0

--ignore-scripts won't help. We need to run the build script to place the binaries at the desired location.
Lets track this issue here: https://github.com/sass/node-sass/issues/467.

am11 picture am11  ·  17 Oct 2014
0

It should and it used to work. If i am not wrong, npm install already installs the latest prebuilt binary for latest node.

Subash picture Subash  ·  17 Oct 2014
0

I still see this error on windows 7 64-bit when using latest grunt-sass npm package. Here is what I see in Node console:

Loading "sass.js" tasks...ERROR
Error: %1 is not a valid Win32 application.
c:\test\node_modules\grunt-sass\node_modules\node-sass\vendor\win32-x64-11\binding.node
smohadjer picture smohadjer  ·  29 May 2015
0

Please follow the steps in our troubleshooting guide and paste the output
into a gist.
On 28 May 2015 23:34, "Saeid Mohadjer" [email protected] wrote:

I still see this error on windows 7 64-bit when using latest grunt-sass
npm package. Here is what I see in Node console:

Loading "sass.js" tasks...ERROR

Error: %1 is not a valid Win32 application.

c:testnode_modulesgrunt-sassnode_modulesnode-sassvendorwin32-x64-11binding.node


Reply to this email directly or view it on GitHub
https://github.com/sass/node-sass/issues/468#issuecomment-106708866.

xzyfer picture xzyfer  ·  29 May 2015
7

I have the same problem, which is fixed by reinstalling the node-sass.

harole picture harole  ·  23 Sep 2015
0

@subash you are installing ancient version of node-sass, the current version is [email protected]

saper picture saper  ·  23 Sep 2015
0

I'm having the same issue and I'm using node 5.6.0 and node-sass 3.8.7 on Windows 7 64 Bit with visual studio 15.

"Restore packages" did not work.

Here's the current output:

> cmd.exe /c gulp -b "E:\WORK\Dashboard\Website\Dashboard.Web" --color --gulpfile "E:\WORK\Dashboard\Website\Dashboard.Web\Gulpfile.js" build [13:29:07] Using gulpfile E:\WORK\Dashboard\Website\Dashboard.Web\Gulpfile.js [13:29:07] Starting 'clean'... [13:29:08] Finished 'clean' after 131 ms [13:29:08] Starting 'build'... [13:29:08] Starting 'styles'... [13:29:08] 'styles' errored after 253 ms [13:29:08] Error: %1 is not a valid Win32 application. E:\WORK\Dashboard\Website\Dashboard.Web\node_modules\node-sass\vendor\win32-ia32-11\binding.node at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (E:\WORK\Dashboard\Website\Dashboard.Web\node_modules\node-sass\lib\index.js:23:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (E:\WORK\Dashboard\Website\Dashboard.Web\node_modules\gulp-sass\index.js:183:21) [13:29:08] Finished 'build' after 256 ms Process terminated with code 1. [13:29:08] gulp-inject 21 files into app.scss.

What is causing this error?

mariorandrade picture mariorandrade  ·  27 Apr 2016
0

What is the reason for the error

majianxiong picture majianxiong  ·  28 Apr 2016
0

This issue stopped happening after after installing es6-promise.

I've added this line on gulpfile.js

var promise = require('es6-promise').polyfill();

right after

var gulp = require('gulp');

mariorandrade picture mariorandrade  ·  28 Apr 2016
28

I have met this problem before.
And I refreshed my node.js.
then
npm install node-sass
It's done.

Or you can try
npm rm node-sass
npm install node-sass

daisyHawen picture daisyHawen  ·  1 Jul 2016
-4

@daisyHawen yay, you are right, I had the same issue and I reinstall local node-sass and its working now. Thanks

yihou picture yihou  ·  15 Jul 2016
1

@daisyHawen Thanks, it works
npm rm node-sass
npm install node-sass

ErisoHV picture ErisoHV  ·  25 Jan 2017
0

after replace the python 3.6.0 to 2.7.0 it's ok

iwantmadaxe picture iwantmadaxe  ·  8 Mar 2017
0

@Subash it is Ok

CurryChou777 picture CurryChou777  ·  20 Mar 2017
0

thanks.it is OK

wangaimin picture wangaimin  ·  5 Apr 2017
1

win7 64 node7.9
try reinstall node-sass, but not work; the lastest version is 4.5.x;
try the old version npm i [email protected], so cool, it just works!!
but i don't understand what happen inside..

stephenykk picture stephenykk  ·  28 Apr 2017
0

Issue is here there is a file named %ur proj path%node_modulesnode-sassvendorwin32-x64-48binding
this binding file is supposed to be an exe.
but sometimes its blocked by proxies or nw errors. so I downloads a file not found html file instead.
so the solution is to delete this file and remove node-sass and re install it

Y2KPRABU picture Y2KPRABU  ·  19 Jul 2017