I am getting below error, while running npm install. Is there anything need to be done in nodejs or some other issue. I am getting below error, whenever I use npm, for example, npm install -g firebase-tools,npm install gulp.
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.3/node-v64-wi
n32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.7.3 and node#10.0.0 (node-v64 ABI, unknown) (falling back to source c
ompile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.j
s:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js
:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:149:21)
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\\b
in\\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=C:\\DEV\\Google Home\\Creating Sample\\
TestSet-up\\functions\\node_modules\\dialogflow\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\g
rpc_node.node" "--module_name=grpc_node" "--module_path=C:\\DEV\\Google Home\\Creating Sample\\TestSet-up\\functions\\node_modu
les\\dialogflow\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\DEV\Google Home\Creating Sample\TestSet-up\functions\node_modules\dialogflow\node_modules\grpc
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=C:\DEV\Google Home\Creating
Sample\TestSet-up\functions\node_modules\dialogflow\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc
_node.node --module_name=grpc_node --module_path=C:\DEV\Google Home\Creating Sample\TestSet-up\functions\node_modules\dialogflo
w\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\DEV\Google Home\Creating Sample\TestSet-up\functions\node_modules\d
ialogflow\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:947:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\DEV\\Google Home\\Creating Sample\\TestSet-up\\functions\\
node_modules\\dialogflow\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "-
-library=static_library"
node-pre-gyp ERR! cwd C:\DEV\Google Home\Creating Sample\TestSet-up\functions\node_modules\dialogflow\node_modules\grpc
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp
.js configure --fallback-to-build --library=static_library --module=C:\DEV\Google Home\Creating Sample\TestSet-up\functions\nod
e_modules\dialogflow\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_n
ode --module_path=C:\DEV\Google Home\Creating Sample\TestSet-up\functions\node_modules\dialogflow\node_modules\grpc\src\node\ex
tension_binary\node-v64-win32-x64-unknown' (1)
npm WARN The package gulp is included as both a dev and production dependency.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.7.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.7.3 install 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\selvamt\AppData\Roaming\npm-cache\_logs\2018-07-17T11_11_19_375Z-debug.log
This problems occurred when we don't have correct build tool in our system.SO you need to install build essential for windows.
You can install build essential for windows with NPM.
But it will take time so don't loose patience
npm install -g windows-build-tools
Make sure to do it in an elevated command prompt (i.e. as an Administrator).
Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details
Related
I'm getting an error when I try to install firebase-admin:
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\TOYANSK\AppData\Roaming\npm\node_modules\npm\node_modules\node-
gyp\lib\build.js:258:23)
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.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\TOYANSK\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\TOYANSK\\Documents\\Projects\\people\\functions\\node_modules\\grpc\\src\\node\\extension_binary\\node-v48-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\TOYANSK\\Documents\\Projects\\people\\functions\\node_modules\\grpc\\src\\node\\extension_binary\\node-v48-win32-x64-unknown"
gyp ERR! cwd C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc
gyp ERR! node -v v6.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program
Files\nodejs\node.exe C:\Users\TOYANSK\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:891:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\TOYANSK\\Documents\\Projects\\people\\functions\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc
node-pre-gyp ERR! node -v v6.11.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\TOYANSK\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\TOYANSK\Documents\Projects\people\functions\node_modules\grpc\src\node\extension_binary\node-v48-win32-x64-unknown' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.7.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.7.3 install 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\TOYANSK\AppData\Roaming\npm-cache\_logs\2018-02-09T23_37_53_013Z-debug.log
To solve this problem, I have tried a lot of things, with no success so far:
I try to update node-gyp and node-pre-gyp
I install Python and MSBuild Tools
I follow this: Why does MSBuild look in C:\ for Microsoft.Cpp.Default.props instead of c:\Program Files (x86)\MSBuild? ( error MSB4019).
I downgraded Node.js: https://www.bountysource.com/issues/38994433-failed-to-install-grpc-version-1-0-1.
And also I try to follow these steps:
Can't install firebase-admin with npm.
But nothing changes the final result. I use Windows 10 64-bit, Node.js v6.11.2 (it was 8.4.0), NPM 5.6.0.
A curious fact is that the error also occurs during the firebase init, which allows to continue even after the error in npm install.
Maybe for this reason firebase-admin has not been previously installed, even being in the package.json of the functions directory
What if you try running npm install -g windows-build-tools in Powershell as admin, as suggested in this answer?
Your stack trace includes node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\TOYANSK\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build ... which most likely means you don't have the node-gyp library installed.
The title of the question that answer addresses is npm install that requires node-gyp fails on Windows.
I tried the installation on two different Windows 10 machines, both with admin privileges and node v8.6.0. + python 3.6.3 amd64. Both failed with the same errors:
C:\Users\kians>npm install -g node-inspector
> v8-profiler#5.7.0 preinstall C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
> node -e 'process.exit(0)'
> v8-debug#1.0.1 preinstall C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node -e 'process.exit(0)'
C:\Users\kians\AppData\Roaming\npm\node-inspector -> C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js
C:\Users\kians\AppData\Roaming\npm\node-debug -> C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\bin\node-debug.js
> v8-debug#1.0.1 install C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#1.0.1 and node#8.6.0 (node-v57 ABI) (falling back to source compile with node-gyp)
C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug>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" clean ) else (node "" clean )
C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug>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" configure --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-w
in32-x64\debug.node --module_name=debug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64 ) else (node "" configure --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=deb
ug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64 )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\kians\AppData\Local\Programs\Python\Python36\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\kians\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v57-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\
\kians\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v57-win32-x64"
gyp ERR! cwd C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=debug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-w
in32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:927:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kians\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
node-pre-gyp ERR! node -v v8.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=debug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-debug#1.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#1.0.1 install 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\kians\AppData\Roaming\npm-cache\_logs\2017-10-11T17_39_49_176Z-debug.log
First I thought files from aws are not available but at the first step a lot of files are being extracted, so I don't think a failed download is the problem.
I was also able to open: C:\Users\kians\AppData\Local\Programs\Python\Python36\python.EXE
EDIT: I run the following command:
npm install --global --production windows-build-tools
Now the error is different:
C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug>if not defined npm_config_node_gyp (node "C:\Program File
s\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug>if not defined npm_config_node_gyp (node "C:\Program File
s\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\kians
\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=debug --
module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64 --pytho
n=C:\Users\kians\.windows-build-tools\python27\python.exe --msvs_version=2015 ) else (node "" configure --fallback-to-build --module=C:\Users
\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=de
bug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64 -
-python=C:\Users\kians\.windows-build-tools\python27\python.exe --msvs_version=2015 )
C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug>if not defined npm_config_node_gyp (node "C:\Program File
s\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=C:\Users\kians\App
Data\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=debug --modu
le_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64 ) else (no
de "" build --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0
.1\node-v57-win32-x64\debug.node --module_name=debug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules
\v8-debug\build\debug\v1.0.1\node-v57-win32-x64 )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hi
nzufügen.
debug.cc
InjectedScriptHost.cc
win_delay_load_hook.cc
..\src\debug.cc(41): warning C4996: 'v8::Debug::Call': was declared deprecated [C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspecto
r\node_modules\v8-debug\build\debug.vcxproj]
C:\Users\kians\.node-gyp\8.6.0\include\node\v8-debug.h(195): note: see declaration of 'v8::Debug::Call'
..\src\debug.cc(52): warning C4996: 'v8::Debug::GetDebugContext': was declared deprecated [C:\Users\kians\AppData\Roaming\npm\node_modules\no
de-inspector\node_modules\v8-debug\build\debug.vcxproj]
C:\Users\kians\.node-gyp\8.6.0\include\node\v8-debug.h(209): note: see declaration of 'v8::Debug::GetDebugContext'
..\src\debug.cc(57): warning C4996: 'v8::Debug::SendCommand': was declared deprecated [C:\Users\kians\AppData\Roaming\npm\node_modules\node-i
nspector\node_modules\v8-debug\build\debug.vcxproj]
C:\Users\kians\.node-gyp\8.6.0\include\node\v8-debug.h(172): note: see declaration of 'v8::Debug::SendCommand'
..\src\debug.cc(78): error C2039: 'GetMirror': is not a member of 'v8::Debug' [C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector
\node_modules\v8-debug\build\debug.vcxproj]
C:\Users\kians\.node-gyp\8.6.0\include\node\v8-debug.h(26): note: see declaration of 'v8::Debug'
..\src\debug.cc(78): error C3861: 'GetMirror': identifier not found [C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modu
les\v8-debug\build\debug.vcxproj]
..\src\debug.cc(71): warning C4996: 'v8::Debug::GetDebugContext': was declared deprecated [C:\Users\kians\AppData\Roaming\npm\node_modules\no
de-inspector\node_modules\v8-debug\build\debug.vcxproj]
C:\Users\kians\.node-gyp\8.6.0\include\node\v8-debug.h(209): note: see declaration of 'v8::Debug::GetDebugContext'
..\src\debug.cc(80): warning C4996: 'v8::Debug::GetDebugContext': was declared deprecated [C:\Users\kians\AppData\Roaming\npm\node_modules\no
de-inspector\node_modules\v8-debug\build\debug.vcxproj]
C:\Users\kians\.node-gyp\8.6.0\include\node\v8-debug.h(209): note: see declaration of 'v8::Debug::GetDebugContext'
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js
" "build" "--fallback-to-build" "--module=C:\\Users\\kians\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build
\\debug\\v1.0.1\\node-v57-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\kians\\AppData\\Roaming\\npm\\node_modules\\n
ode-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v57-win32-x64"
gyp ERR! cwd C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modu
les\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=debug --module_path=C:\Users\kians\App
Data\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\node-pre-
gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:927:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 10.0.15063
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kians\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_m
odules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
node-pre-gyp ERR! node -v v8.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\Users\kians\AppData\Roaming\npm\node_modules\node-inspector\node_modules
\v8-debug\build\debug\v1.0.1\node-v57-win32-x64\debug.node --module_name=debug --module_path=C:\Users\kians\AppData\Roaming\npm\node_modules\n
ode-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v57-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-debug#1.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#1.0.1 install 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\kians\AppData\Roaming\npm-cache\_logs\2017-10-11T18_45_47_242Z-debug.log
According to thread https://github.com/node-inspector/node-inspector/issues/1010#issuecomment-306972510, node inspector is not working with node 8.X.
you can use the built-in debugger tools. https://nodejs.org/en/docs/inspector/
To begin with this error seems to be related with the node-gyp package. According to their documentation page in github there are 2 setup options for Windows.
Option 1 is to run:
npm install --global --production windows-build-tool
Which you have already done, but in my experience did not work for me as well.
Try option 2 as well:
Install Visual C++ Build Tools using the Default Install option.
Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.
Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)
Launch cmd, npm config set msvs_version 2015
I'm running Ubuntu 17.04
node version: 8.0.0
npm version: 5.3.0
node-gyp version: 3.6.2
csaba#titan:~/GitRepos/valleydevfest2017$ sudo npm install -g iltorb
> iltorb#1.3.5 install /usr/local/lib/node_modules/iltorb
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://github.com /MayhemYDG/iltorb/releases/download/1.3.5/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for iltorb#1.3.5 and node#8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local /lib/node_modules/iltorb/build'
gyp ERR! System Linux 4.10.0-28-lowlatency
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node" "--module_name=iltorb" "--module_path=/usr/local/lib/node_modules/iltorb/build/bindings"
gyp ERR! cwd /usr/local/lib/node_modules/iltorb
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node --module_name=iltorb --module_path=/usr/local/lib/node_modules/iltorb/build/bindings' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/iltorb/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.10.0-28-lowlatency
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/iltorb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/iltorb
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/iltorb/build/bindings/iltorb.node --module_name=iltorb --module_path=/usr/local/lib/node_modules/iltorb/build/bindings' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iltorb#1.3.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iltorb#1.3.5 install 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! /home/csaba/.npm/_logs/2017-08-11T04_34_39_178Z-debug.log
Now firebase-tools doesn't work at all. I wish I stayed with v3.9.0.
Filed an issue: https://github.com/MayhemYDG/iltorb/issues/46
What can I do?
I had the same problem today, after reading many things and trying many things (e.g. sudo npm install -g gyp-node) nothing worked, untill I stumbled on NPM's unsafe-perm flag:
--unsafe-perm
WARNING: Use with care and read the documentation first
But it fixed my problem and hopefully yours too.
I am tring to execute fabcar example from Hyperledger-fabric where I have created few cars. When I try to execute
node query.js
at ../fabric-samples/fabcar I am getting an error
fabric-client not found
If I execute
npm install
I have node 6.9.0 and npm 3.10.0
I am getting error like this
> grpc#1.2.4 install /home/.../fabric-samples/fabcar/node_modules/grpc
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.2.4/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.2.4 and node#8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/.../fabric-samples/fabcar/node_modules/grpc/.node-gyp"
make: Entering directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build'
make: *** No rule to make target '../.node-gyp/8.0.0/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.4.0-42-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary"
gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node
--module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.4.0-42-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules /npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary' (1)
fabcar#1.0.0 /home/.../fabric-samples/fabcar`-- (empty)
npm WARN fabcar#1.0.0 No repository field.
npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v8.0.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! grpc#1.2.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.2.4 install script 'node-pre-gyp install --fallback-to-build'.
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 grpc package
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs grpc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls grpc
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/.../fabric-samples/fabcar/npm-debug.log
npm ERR! code 1
can anyone help me to execute the code
It was solved after deleting directory node_module and then doing
npm install
When trying to use sqlite with electron i've been getting this error in the web console
Error: Cannot find module 'C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\el ectron-v1.4-win32-ia32\node_sqlite3.node'
After reading some posts in the site i've seen that by using
npm install sqlite3 --build-from-source
I can fix this error, however when i tried to do so i got the following message
sqlite3#3.1.8 install C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3>if not defined npm_config_node_gyp (node "C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32 ) else (node "" configure --fallback-to-build --module=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32 )
gyp ERR! configure error
gyp ERR! stack Error: Python executable
"C:\Users\Alejandro\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:14)
gyp ERR! stack at C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\node_modules\node-
gyp\lib\configure.js:443:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:197:7)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe"
"C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32"
gyp ERR! cwd C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3
gyp ERR! node -v v6.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-
build"
node-pre-gyp ERR! cwd C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3
node-pre-gyp ERR! node -v v6.9.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Alejandro\Documents\Proyectos\format\node_modules\sqlite3\lib\binding\node-v48-win32-ia32' (1)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "sqlite3" "--build-from-source"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! sqlite3#3.1.8 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#3.1.8 install script 'node-pre-gyp install --fallback-to-build'.
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 sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Alejandro\Documents\Proyectos\format\npm-debug.log
I've already tried installing the node-gyp and node-pre-gyp dependancies and still get the same error