-
Notifications
You must be signed in to change notification settings - Fork 234
Error install windows-build-tools #20
Comments
Hey @facelinker, I can see from the logs that the script failed to run PowerShell. Which version of Windows are you running? Are you attempting the installation from PowerShell? |
I'm trying to run the installation from an elevated powershell prompt in Windows 7. Here is the npm-debug.log from the point where the script tries to execute the postinstall tasks:
|
Found a solution while writing the post above... Just add
to your PATH and you should be good to go |
If on Jenkins / windows slaves reverse the slashes if you're setting the slave's PATH variable through the ENVIRONMENT feature in node configuration. |
run cmd as administrator after doing what DcBexter told above, |
Note also that you should use the system @felixrieseberg, how hard would it be to output a more meaningful error message for cases where the script can't find/run PowerShell? If I hadn't found this thread I might still be stuck. There wasn't anything in the log about PowerShell, so it wasn't obvious to me. What if it output another line here saying something like, "Could not run PowerShell (Is it in the system's PATH?)"
|
@DcBexter Hi sir, how can i do the adding of %SystemRoot%/system32/WindowsPowerShell/v1.0 to my path? Is it on the CMD? I tried adding but it says The system cannot find the path specified. It's embarrassing, but i don't get the instruction well. By the way, my project path is c:\xampp\htdocs\ifsumis... is this the path to add to %SystemRoot%/system32/WindowsPowerShell/v1.0? |
@resnef Hi, the Path is an environment variable which you can set in "advanced system settings" (Control Panel -> System -> Advanced System Settings -> Environment Variables / Or press "Windows key" + "Pause key" -> Advanced System Settings -> Environment Variables ) It is possible to set the path on the commandline (cmd.exe) with
Which would add %SystemRoot%/system32/WindowsPowerShell/v1.0 To the path of your current user. If you want to change the path system-wide for all users, you have to start cmd.exe as an administrator and use the /M Parameter:
If you use powershell instead of cmd.exe you have to use this:
|
@DcBexter Hi, After making the changes to PATH variable as mentioned, i ran the command npm install --global --production windows-build-tool But it's for running the command is running for a long time. Its 15 mins & is still running. +Update--Installed successfully after running for around 30 mins. Thanks for the help @DcBexter & All. |
Hi, i am getting this, and i tried adding values to the path variable: |
@nahidarashid Could you please edit your message so that the console output is formatted such that it is easier to read? (e.g. currently there are no newlines, so it just looks like a "wall of text") |
@nahidarashid Your problem may also be caused by a geolocation problem. Feel free to check out #110 and try setting the environment variable to work around the problem as I suggsted to TikiLobel. |
Hi jsurya9311, please contact me about development 7010482701 |
Pls check this and tell how to fix this ? |
Windows PowerShell (Mouse right click - Administrator), |
Complete solution is
|
i have done all possible ways that listed on this page but my problem not solve till now
Downloading python-2.7.15.amd64.msi Starting installation... npm ERR! A complete log of this run can be found in: |
Did you try running the Powershell with elevated rights? Because your log tells you right there:
|
Trying to run npm install --global --production windows-build-tools and i keep getting this issue. `C:\Users\asus\AppData\Roaming\npm\node_modules\windows-build-tools\dist\compatible.js:4 npm ERR! windows-build-tools@5.2.2 postinstall: npm ERR! Please include the following file with any support request: |
Error 2021-07-04T22_04_08_032Z-debug.log 0 info it worked if it ends with ok |
C:\Windows\system32>npm install --global --production windows-build-tools
... and 1 more
... and 1 more
Downloaded python-2.7.11.msi. Saved to C:\Users\Alexander.windows-build-tools\p
ython-2.7.11.msi.
Starting installation...
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn powershell.exe ENOENT
at exports._errnoException (util.js:1007:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "--global" "--production" "windows
-build-tools"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! windows-build-tools@0.4.1 postinstall:
node ./lib/index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools@0.4.1 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 p
ackage,
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! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log
The text was updated successfully, but these errors were encountered: