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

node-sass@1.0.1: [Windows Error ] %1 is not a valid win32 application #468

Closed
Subash opened this issue Oct 17, 2014 · 18 comments
Closed

node-sass@1.0.1: [Windows Error ] %1 is not a valid win32 application #468

Subash opened this issue Oct 17, 2014 · 18 comments

Comments

@Subash
Copy link

Subash commented Oct 17, 2014

windows_8__running_

@Subash
Copy link
Author

Subash commented Oct 17, 2014

Full Log,

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

C:\Users\Subash>npm install node-sass
-
> node-sass@1.0.1 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! node-sass@1.0.1 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@1.0.1 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
node-sass@1.0.1 node_modules\node-sass
├── get-stdin@3.0.0
├── object-assign@1.0.0
├── node-watch@0.3.4
├── nan@1.3.0
├── shelljs@0.3.0
├── yargs@1.3.2
├── mkdirp@0.5.0 (minimist@0.0.8)
├── chalk@0.5.1 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0
.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── sinon@1.10.3 (util@0.10.3, formatio@1.0.2)
└── mocha@1.21.5 (escape-string-regexp@1.0.2, diff@1.0.8, growl@1.8.1, commander
@2.3.0, jade@0.26.3, glob@3.2.3, debug@2.0.0)

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 Subash changed the title [Windows] %1 is not a valid win32 application [Windows Error ] %1 is not a valid win32 application Oct 17, 2014
@am11
Copy link
Contributor

am11 commented Oct 17, 2014

--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: #467.

@am11 am11 closed this as completed Oct 17, 2014
@Subash
Copy link
Author

Subash commented Oct 17, 2014

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

@smohadjer
Copy link

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

@xzyfer
Copy link
Contributor

xzyfer commented May 29, 2015

Please follow the steps in our troubleshooting guide and paste the output
into a gist.
On 28 May 2015 23:34, "Saeid Mohadjer" notifications@github.com 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:\test\node_modules\grunt-sass\node_modules\node-sass\vendor\win32-x64-11\binding.node


Reply to this email directly or view it on GitHub
#468 (comment).

@harole
Copy link

harole commented Sep 23, 2015

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

@saper saper changed the title [Windows Error ] %1 is not a valid win32 application node-sass@1.0.1: [Windows Error ] %1 is not a valid win32 application Sep 23, 2015
@saper
Copy link
Member

saper commented Sep 23, 2015

@Subash you are installing ancient version of node-sass, the current version is node-sass@3.3.3

@mariorandrade
Copy link

mariorandrade commented Apr 27, 2016

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?

@small-carbon
Copy link

What is the reason for the error

@mariorandrade
Copy link

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');

@daisyHawen
Copy link

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

@yihou
Copy link

yihou commented Jul 15, 2016

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

@ErisoHV
Copy link

ErisoHV commented Jan 25, 2017

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

@iwantmadaxe
Copy link

after replace the python 3.6.0 to 2.7.0 it's ok

@CurryChou777
Copy link

@Subash it is Ok

@wangaimin
Copy link

thanks.it is OK

@stephenykk
Copy link

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

@Y2KPRABU
Copy link

Issue is here there is a file named %ur proj path%\node_modules\node-sass\vendor\win32-x64-48\binding
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

@sass sass locked and limited conversation to collaborators Jul 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests