Windows-build-tools: npm install --global --production windows-build-tools

Created on 4 May 2017  路  18Comments  路  Source: felixrieseberg/windows-build-tools

C:\Users\defaultuser>npm install --global windows-build-tools

[email protected] postinstall C:\Users\defaultuser\AppData\Roaming\npmnode_modules\windows-build-tools
node ./lib/index.js

Downloading BuildTools_Full.exe
Downloading python-2.7.11.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.11.msi. Saved to C:\Users\defaultuser.windows-build-tools\python-2.7.11.msi.
Starting installation...
events.js:163
throw er; // Unhandled 'error' event
^

Error: spawn powershell.exe ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node ./lib/index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node ./lib/index.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 windows-build-tools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs windows-build-tools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls windows-build-tools
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\defaultuser\AppData\Roaming\npm-cache_logs\2017-05-04T16_26_21_866Z-debug.log

C:\Users\defaultuser>

Most helpful comment

The following just worked for me
adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable

thanks to https://github.com/felixrieseberg/windows-build-tools/issues/20

All 18 comments

Same error. Installed manually and still didn't work.
Installed node-gyp, but it didn't work either.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall:node ./lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node ./lib/index.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 windows-build-tools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs windows-build-tools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls windows-build-tools
npm ERR! There is likely additional logging output above.
This is for the windows build tools.


However:

[email protected] install:node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 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-opus package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-opus npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-opus npm ERR! There is likely additional logging output above.
This for node-opus.

I installed npm and updated it. Also using nodejs 7.10.0.

I can't solve the issue.

Am also observing the same issue... Anybody has solution for this issue... Error log:

npm install --global --production windows-build-tools

[email protected] postinstall C:\Users\narendraa\Downloads\Toolsnode-v7.9.0-win-x64node-v7.9.0-win-x64node_modules\windows-build-tools
node ./lib/index.js

Downloading BuildTools_Full.exe
Downloading python-2.7.11.msi
[> ] 0.0% (0 B/s)
Downloaded python-2.7.11.msi. Saved to C:\Users\narendraa.windows-build-tools\python-2.7.11.msi.
Starting installation...
events.js:163
throw er; // Unhandled 'error' event
^

Error: spawn powershell.exe ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\narendraa\Downloads\Toolsnode-v7.9.0-win-x64node-v7.9.0-win-x64node_modules\windows-build-toolsnode_modules'
npm WARN { Error: EPERM: operation not permitted, scandir 'C:\Users\narendraa\Downloads\Toolsnode-v7.9.0-win-x64node-v7.9.0-win-x64node_modules\windows-build-toolsnode_modules'
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'scandir',
npm WARN path: 'C:\Users\narendraa\Downloads\Tools\node-v7.9.0-win-x64\node-v7.9.0-win-x64\node_modules\windows-build-tools\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node ./lib/index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\narendraa\AppData\Roaming\npm-cache_logs\2017-05-19T06_02_33_819Z-debug.log

The following just worked for me
adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable

thanks to https://github.com/felixrieseberg/windows-build-tools/issues/20

Thanks for the info - the root error here is that Windows on your systems seems to have trouble finding powershell.exe. Tragic, given that that's how you'd do anything 馃棥

We should probably add a better error message.

@agarwal57 Thanks Bro
"adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable" Also worked for me

i have the issue when install window-build-tools: Help me !
C:\WINDOWS\system32>npm install --global --production windows-build-tools
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/windows-build-tools failed, reason: connect ETIMEDOUT 13.250.177.223:8080
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tuan\AppData\Roaming\npm-cache_logs\2018-04-06T13_25_18_231Z-debug.log

Hi All / @felixrieseberg ,

I have added %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable.
But getting the below error -


> [email protected] postinstall C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./lib/index.js

C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\os.js:53
                        throw resultError;
                        ^

Error: Exited with status 1
    at closeArgsToError (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:6:15)
    at spawnSync (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:61:16)
    at regQuery (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:80:3)
    at getNation (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:90:3)
    at Object.geo [as sync] (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:102:3)
    at Object.osSync (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\os.js:48:7)
    at Object.<anonymous> (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\lib\constants.js:4:99)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\single-line-log\node_modules'
npm WARN  { Error: EPERM: operation not permitted, scandir 'C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\single-line-log\node_modules'
npm WARN   stack: 'Error: EPERM: operation not permitted, scandir \'C:\\Users\\ABC\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\single-line-log\\node_modules\'',
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'scandir',
npm WARN   path: 'C:\\Users\\ABC\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\single-line-log\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\ABC\AppData\Roaming\npm-cache\_logs\2018-05-16T13_53_26_940Z-debug.log

c:\Windows\System32>npm install --global windows-build-tools

> [email protected] postinstall C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./lib/index.js

C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\os.js:53
                        throw resultError;
                        ^

Error: Exited with status 1
    at closeArgsToError (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:6:15)
    at spawnSync (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:61:16)
    at regQuery (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:80:3)
    at getNation (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:90:3)
    at Object.geo [as sync] (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\geo.js:102:3)
    at Object.osSync (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\in-gfw\lib\os.js:48:7)
    at Object.<anonymous> (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\lib\constants.js:4:99)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\single-line-log\node_modules'
npm WARN  { Error: EPERM: operation not permitted, scandir 'C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\single-line-log\node_modules'
npm WARN   stack: 'Error: EPERM: operation not permitted, scandir \'C:\\Users\\ABC\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\single-line-log\\node_modules\'',
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'scandir',
npm WARN   path: 'C:\\Users\\ABC\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\single-line-log\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.



Please help. Thanks.

@MahapatrO This looks like it's related to the mirror selector code (in-gfw). Please check out https://github.com/felixrieseberg/windows-build-tools/issues/110 and try the work-around I suggested there.

@jacobq, I have added the environment variable "npm_config_python_mirror="https://www.python.org/ftp/python".

Now I am getting another error.

PS C:\Users\ABC> npm install --global windows-build-tools

[email protected] postinstall C:\Users\ABC\AppData\Roaming\npmnode_modules\windows-build-tools
node ./lib/index.js

Downloading python-2.7.14.amd64.msi
Error: tunneling socket could not be established, statusCode=407
{ Error: tunneling socket could not be established, statusCode=407
    at ClientRequest.onConnect (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\tunnel-agent\index.js:166:19)
    at Object.onceWrapper (events.js:319:30)
    at emitThree (events.js:136:13)
    at ClientRequest.emit (events.js:217:7)
    at Socket.socketOnData (_http_client.js:474:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
Downloading BuildTools_Full.exe
[>                                            ] 0.0% (0 B/s)
Downloaded BuildTools_Full.exe. Saved to C:\Users\ABC\.windows-build-tools\BuildTools_Full.exe.
+ [email protected]
updated 1 package in 212.296s

Please Help. Thanks.

@MahapatrO Now that looks like a connectivity / proxy server problem. I would suggest checking that you can download the file manually as well as peeking at proxy settings. See also https://stackoverflow.com/questions/26053879/npm-install-tunneling-socket-could-not-be-established#41247148

I have addressed it.put the powershell.exe 's path into environment variables

Pls check this and tell how to fix this ?

https://github.com/victorbutler/binance-profit-calculator/issues/22#issue-398143509

The following just worked for me
adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable

thanks to #20

now its working.

The following just worked for me
adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable

thanks to #20

Thank you this is working!

@agarwal57 Thanks Bro
"adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable" Also worked for me

Hey where to add this?

@Rickey07 To your PATH environment variable.

@agarwal57 Thanks Bro
"adding %SystemRoot%/system32/WindowsPowerShell/v1.0 to the path variable" Also worked for me

thank you, this is working

Please guide how to add it to path variable...I am new to it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mohdsameer7408 picture mohdsameer7408  路  7Comments

CookieJunkie picture CookieJunkie  路  6Comments

bwhybrow23 picture bwhybrow23  路  3Comments

Archer456 picture Archer456  路  5Comments

DanielNaaman picture DanielNaaman  路  3Comments