ascii-progress icon indicating copy to clipboard operation
ascii-progress copied to clipboard

Fails to install under Windows

Open marcuswhybrow opened this issue 7 years ago • 6 comments

I'm using Git BASH. Running npm install ascii-progress gives:

> [email protected] install C:\[REDACTED]\node_modules\ascii-progress\node_modules\get-cursor-position
> node-gyp rebuild


C:\[REDACTED]\node_modules\ascii-progress\node_modules\get-cursor-position>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.  [C:\[REDACTED]\node_modules\ascii-progress\node_modules\get-cursor-position\build\binding.sln]
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 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\[REDACTED]\node_modules\ascii-progress\node_modules\get-cursor-position
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ascii-progress" "--save-dev"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE

npm ERR! [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! This is most likely a problem with the get-cursor-position 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 get-cursor-position
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls get-cursor-position
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\[REDACTED]\npm-debug.log

marcuswhybrow avatar Sep 30 '16 16:09 marcuswhybrow

try v1.0.5

bubkoo avatar Nov 01 '16 02:11 bubkoo

I have the same problem with 1.0.5. Just feshly installed Microsoft Visual Studio 14.0. Didn't help.

jobe451 avatar Jan 28 '17 14:01 jobe451

"Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator)."

https://www.npmjs.com/package/node-gyp

icetbr avatar Feb 10 '17 14:02 icetbr

installing windows-build-tools didn't work for me:

> [email protected] install D:\[REDACTED]\node_modules\get-cursor-position
> node-gyp rebuild


D:\[REDACTED]\node_modules\get-cursor-position>if not defined npm_config_node_gyp (node "C:\Users\[REDACTED-USERNAME]\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\
node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
D:\[REDACTED]\node_modules\get-cursor-position\build\pos.vcxproj(20,3): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in th
e <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\[REDACTED-USERNAME]\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "c:\\program files\\nodejs\\node.exe" "C:\\Users\\[REDACTED-USERNAME]\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\[REDACTED]\node_modules\get-cursor-position
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok
[email protected] D:\[REDACTED]
+-- [email protected]  extraneous
`-- [email protected]  extraneous

npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "c:\\program files\\nodejs\\node.exe" "C:\\Users\\[REDACTED-USERNAME]\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "ascii-progress"
npm ERR! node v4.2.6
npm ERR! npm  v3.7.5
npm ERR! code ELIFECYCLE

npm ERR! [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 get-cursor-position 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 get-cursor-position
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls get-cursor-position
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\[REDACTED]\npm-debug.log
PS D:\[REDACTED]>

from npm-debug.log:

...
330 verbose stack Error: [email protected] install: `node-gyp rebuild`
330 verbose stack Exit status 1
330 verbose stack     at EventEmitter.<anonymous> (C:\Users\[REDACTED-USERNAME]\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:239:16)
330 verbose stack     at emitTwo (events.js:87:13)
330 verbose stack     at EventEmitter.emit (events.js:172:7)
330 verbose stack     at ChildProcess.<anonymous> (C:\Users\[REDACTED-USERNAME]\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
330 verbose stack     at emitTwo (events.js:87:13)
330 verbose stack     at ChildProcess.emit (events.js:172:7)
330 verbose stack     at maybeClose (internal/child_process.js:821:16)
330 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
331 verbose pkgid [email protected]
332 verbose cwd D:\[REDACTED]
333 error Windows_NT 10.0.14393
334 error argv "c:\\program files\\nodejs\\node.exe" "C:\\Users\\[REDACTED-USERNAME]\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "ascii-progress"
335 error node v4.2.6
336 error npm  v3.7.5
337 error code ELIFECYCLE
338 error [email protected] install: `node-gyp rebuild`
338 error Exit status 1
339 error Failed at the [email protected] install script 'node-gyp rebuild'.
339 error Make sure you have the latest version of node.js and npm installed.
339 error If you do, this is most likely a problem with the get-cursor-position package,
339 error not with npm itself.
339 error Tell the author that this fails on your system:
339 error     node-gyp rebuild
339 error You can get information on how to open an issue for this project with:
339 error     npm bugs get-cursor-position
339 error Or if that isn't available, you can get their info via:
339 error     npm owner ls get-cursor-position
339 error There is likely additional logging output above.
340 verbose exit [ 1, true ]

eczajk1 avatar Feb 15 '17 17:02 eczajk1

Im late here but this solved it for me

npm install -g windows-build-tools

muhammadtalhas avatar May 18 '17 19:05 muhammadtalhas

@bubkoo this can be closed.

Nod build tools wasn't configured

Mart-Bogdan avatar Mar 30 '18 16:03 Mart-Bogdan