npm install irc failing - node.js

I've been trying to install the node-irc library for Node.Js.
I seem to be running into this issue and not sure why. I installed a fresh copy of Node.JS (version 4.22), I have .NET Framework 2.0 SDK installed on Windows, and Python 2.7.10
Here is the error:
C:\Users\Owner\Desktop\Test\node_modules\irc\node_modules\node-icu-charset-detector>if not defined npm_config_node_gyp (node "D:\Program Files (x86)\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.
d:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(13): fatal error C1083: Cannot open include file: 'windows.h':No such file or directory
[C:\Users\Owner\Desktop\Test\node_modules\irc\node_modules\node-icu-charset-detector\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 (D:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270: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 6.2.9200
gyp ERR! command "D:\Program Files (x86)\nodejs\node.exe" "D:\Program Files(x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Owner\Desktop\Test\node_modules\irc\node_modules\node-icu-charset-detector
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
iconv#2.1.11 install C:\Users\Owner\Desktop\Test\node_modules\irc\node_modules\
iconv
node-gyp rebuild

Related

Error at rebuild SQLite3 for a Electron app

I am trying to install sqlite3 to make an app in Electron over Windows. I put in my package.json:
"rebuild": "electron-rebuild -f -w sqlite3"
When I run:
npm run rebuild
I get this error:
Error: The projects of this solution will be compiled one at a time. To enable compilation in parallel, add the "/ m" switch.
D:\WindowsDev\CopyWatcher\node_modules\sqlite3\build\deps\action_before_build.vcxproj(20,3): error MSB4019: The imported project "D: \ Microsoft.Cpp.Default.props" can not be found. Make sure that the path of the <Import> declaration is correct and that the file is on the disk.
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 (D:\WindowsDev\CopyWatcher\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\WindowsDev\\CopyWatcher\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.10" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=D:\\WindowsDev\\CopyWatcher\\node_modules\\sqlite3\\lib\\binding\\electron-v2.0-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.0.2/{toolset}/" "--package_name=electron-v2.0-win32-x64.tar.gz"
gyp ERR! cwd D:\WindowsDev\CopyWatcher\node_modules\sqlite3
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
I install Visual Studio Developer Tools 2015 and sqlite3 module works well!

Compiling native node module with npm i fails, works with node-gyp rebuild

I'm trying to compile a native node module using
npm i
This fails with error
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
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:\bitbucket\node\native_modules
gyp ERR! node -v v6.10.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
However, if I run the node-gyp command manually with
node-gyp rebuild
Then it works fine.
I notice that node-gyp --version returns v3.6.0 whereas in the error message above it's running v3.4.0.
How do I update npm to use the newer version (which seems to work ok)?
Also, why would this be failing on the old version?
I tried the instructions here https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp they don't seem to work. I'm on Windows 10.
I have this working now. Here's what I did:
Open a command prompt (run as administrator). cd to the node installation folder, then run:
C:\Program Files\nodejs\node_modules\npm>npm uninstall node-gyp --save
C:\Program Files\nodejs\node_modules\npm>npm install node-gyp --save

cant do npm install - Macro definition of snprintf conflicts

I'm trying to start my heroku nodejs application at brand new computer. I don't have any problems with this application at older computer, but here I'm receiving:
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\OEM\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.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\OEM\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\programowanie\naszatrasa\node_modules\mmmagic
gyp ERR! node -v v5.1.1
gyp ERR! node-gyp -v v3.2.0
gyp ERR! not ok
previous logs contain logs such as:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling sourc
e file ..\..\..\deps\libmagic\src\apprentice.c) [C:\programowanie\naszatrasa\node_modules\mmmagic\build\deps\libmagic\libmagic.vcxproj]
I have tried previous versions of npm and node but had problems with node-gyp and Visual Studio 2015 (which I have installed)

npm install socket.io stack Error: `msbuild` failed with exit code: 1

I'm going crazy with the installation of socket.io. I tried various solutions around the net but every time I get an error.
I followed the instructions at this link about node-gyp.
I have windows7 professional 64 bit.
here is what I get from the shell
C:\Users\utente\Projects\webrtc>npm install socket.io
> utf-8-validate#1.2.1 install C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
/
C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(507,5): error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a
supported PlatformToolset value is selected. [C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\ProgramFiles\nodejs\node_modules\npm\node_modules\node- gyp\lib\build.js:270: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 6.1.7601
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:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
> bufferutil#1.2.1 install C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gypbin\\..\..\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(507,5): error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a
supported PlatformToolset value is selected. [C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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:270: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 6.1.7601
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:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
> utf-8-validate#1.2.1 install C:\Users\utente\Projects\webrtc\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild
.....
.....
.....
any suggestions?
thanks

NodeJS 5 errors while installing npm packages

Since I installed node 5.0.0, I start getting errors while installing most of npm packages.
it never happened before when I had node 4.x.
after
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python27\python.exe", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
gyp ERR! stack at c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10240
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:\Users\Murhaf\AppData\Roaming\npm\node_modules\ember-cli\node_modules\bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
basically there's 2 main errors.
The first is asking for python.
The second is asking for .Net SDK 2.0.
after getting python 2.7.10 installed the first error disappeared. but I couldn't pass the MSbuild.exe error even after installing .Net SDK.
Is this happening with everyone?
Do I have to install Visual Studio to get node.js and NPM to work?
I prefer not to. Any alternative way?
I tried a clean installation, restarted my PC and installed it again, same errors.
Update
Now I installed both Python and VS2015, the previous errors are gone but I have this error
c:\Users\Murhaf\Desktop\sage\node_modules\bufferutil\build\bufferutil.vcxproj(20,3): error MSB4019: The imported projec
t "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" was not found. Confirm that the
path in the <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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270: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.10240
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:\Users\Murhaf\Desktop\sage\node_modules\bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil bufferutil#1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil Exit status 1
you need Visual Studio and Python to install modules with binary components on windows, which probably means the module you are trying to install has binary components, so try to install it after Visual studio and Python.
npm install --msvs_version=2013 should work.
I am having problems with VS2015, too.

Resources