while during npm install with heapdump faciing below error - heap-dump

while install heapdump using nodejs I am facing below error message. I have installed python on the system also. I have to install heapdump package in node_module.
Below is the part of package.json where i have specified the heapdump version.
"grunt-shell": "^0.6.4",
"heapdump": "^0.3.4"
error:
[06:26:28][Step 4/8] npm http 304 https://registry.npmjs.org/getobject
[06:26:28][Step 4/8] npm ERR! heapdump#0.3.5 install: `node-gyp rebuild`
[06:26:28][Step 4/8] npm ERR! Exit status 1
[06:26:28][Step 4/8] npm ERR!
[06:26:28][Step 4/8] npm ERR! Failed at the heapdump#0.3.5 install script.
[06:26:28][Step 4/8] npm ERR! This is most likely a problem with the heapdump package,
[06:26:28][Step 4/8] npm ERR! not with npm itself.
[06:26:28][Step 4/8] npm ERR! Tell the author that this fails on your system:
[06:26:28][Step 4/8] npm ERR! node-gyp rebuild
[06:26:28][Step 4/8] npm ERR! You can get their info via:
[06:26:28][Step 4/8] npm ERR! npm owner ls heapdump
[06:26:28][Step 4/8] npm ERR! There is likely additional logging output above.
[06:26:28][Step 4/8]
[06:26:28][Step 4/8] npm ERR! System Windows_NT 6.1.7601
[06:26:28][Step 4/8] npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
[06:26:28][Step 4/8] npm ERR! cwd C:\TeamCity\buildAgent\work\60663b0f150483a8\smoke
[06:26:29][Step 4/8] npm ERR! node -v v0.10.22
[06:26:29][Step 4/8] npm ERR! npm -v 1.3.14
[06:26:29][Step 4/8] npm ERR! code ELIFECYCLE
t

You have not specified the operating system in your question but the error trace shows Windows_NT 6.1.7601.
There may be more than one reason for its failure.
node-gyp is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. So when you try to install heapdump, internally it uses 'node-gyp' to rebuild the module for your particular platform (windows/unix/mac etc).
One possible reason is the version of python used. Python v2.7 recommended, v3.x.x is not supported. If this is the case you will get the error like the below.
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" 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.
To solve this issue you can use the npm install python switch as below.
npm install --python=python2.7
Other reason for failure is specific to OS. If you are installing this on Windows you should have Microsoft Visual Studio C++ 2013 (XP/7/8 etc) or Visual Studio Community 2015 Edition(Windows 10).
Read this link to understand more

I have had a same problem when installing heapdump#^0.3.12 package, npm used node gyb to rebuild package. I changed python version , installed visual bla bla.... but it didn't worked. Then I used another device with another npm and node version, it worked.
I think cause of the problem is node and npm version. I upgraded them then it worked in my device.
Before: node: 10.15.3 After: node: 14.16.1
npm: 6.9.2 npm: 6.14.12
There is a recommendation here. Latest version maybe can't help you, let try with some near version.

Related

How to solve one errror installing an Angular Template ngx-admin

I want to use ngx-admin template for my project, I followed the instructions to install into angular 14 and I get these errors
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ngx-admin#8.0.0
npm ERR! Found: #angular/common#12.2.16
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"^12.2.16" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^10.0.4" from ng2-ckeditor#1.2.9
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\HP Spectre X360 G1\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP Spectre X360 G1\AppData\Local\npm-cache\_logs\2022-07-23T03_56_45_643Z-debug-0.log
PS C:\dev\Angular\proyectos\09-ngx-admin>

Trying to run Gulp on Mac but it's not working

I'm trying to run Gulp on my Mac. I went into terminal and cd'd into my gulp folder. When I type
gulp
I get "-bash: gulp: command not found". In my gulp folder I do have a gulpfile.js in there but again I get nothing. Where do I go from here?
Here's the errors I get when I npm install -g:
MacBook-Pro-2:gulp-dev damien$ npm install -g gulp
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! path ../lib/node_modules/gulp/bin/gulp.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/gulp/bin/gulp.js' -> '/usr/local/bin/gulp'
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/gulp/bin/gulp.js' -> '/usr/local/bin/gulp'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/gulp/bin/gulp.js',
npm ERR! dest: '/usr/local/bin/gulp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/damien/.npm/_logs/2017-04-11T20_42_46_317Z-debug.log
MacBook-Pro-2:gulp-dev damien$ npm install -g gulp
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "gulp"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! path ../lib/node_modules/gulp/bin/gulp.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/gulp/bin/gulp.js' -> '/usr/local/bin/gulp'
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/gulp/bin/gulp.js' -> '/usr/local/bin/gulp'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/gulp/bin/gulp.js',
npm ERR! dest: '/usr/local/bin/gulp' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/damien/.npm/_logs/2017-04-11T20_43_48_551Z-debug.log
Have you installed Gulp on your machine yet?
If your folder has a package.json file, make sure you can see Gulp in there listed between your devDependencies. These dependencies are what you use during development of your Node project.
If you don't have a package.json file, you can create one in the command line via npm init, then install Gulp locally on your machine with npm install -g gulp, and then install the command line interface for gulp in your project folder: npm install --save-dev gulp-cli. The CLI will run the Gulp executable with the Gulpfile.js that's in your project.
More information can be found on their website: http://gulpjs.com/

What is missing from my PeP proxy installation?

I am following this tutorial to install PeP proxy.
I have installed both node and npm on my CentOS 6.7:
[root#centos fi-ware-pep-proxy]# node -v
v0.10.41
[root#centos fi-ware-pep-proxy]# npm -v
1.4.29
But when I get into the fi-ware-pep-proxy folder and and run npm install, I get the following error:
[root#centos fi-ware-pep-proxy]# npm install
npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm#2, if not the
npm WARN deprecated latest stable version. To upgrade to npm#2, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm#2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
-
> node-expat#2.1.4 install /root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat
> node-gyp rebuild
make: Entering directory `/root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat/build'
CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
make: cc: Command not found
make: *** [Release/obj.target/expat/deps/libexpat/lib/xmlparse.o] Error 127
make: Leaving directory `/root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-573.8.1.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat
gyp ERR! node -v v0.10.41
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! node-expat#2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.1.4 install script.
npm ERR! This is most likely a problem with the node-expat 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 their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-573.8.1.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /root/fi-ware-pep-proxy
npm ERR! node -v v0.10.41
npm ERR! npm -v 1.4.29
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I tried looking for expat-devel which I also yum installed, but the error remains the same.
I also checked my python version and saw that it is:
[root#centos fi-ware-pep-proxy]# python -V
Python 2.6.6
Does anyone have a clue how I can solve this issue?
Thanks to #Álvaro Alonso I came to the conclusion that I should install gcc:
sudo yum install gcc gcc-c++
as explained here:
https://www.vultr.com/docs/how-to-install-gcc-on-centos-6
Thank you!

phone gap cordova installation

I'm trying to install phonegap but getting following error message. I have tried this for cordova also but of no use, Please help me
Your environment has been set up for using Node.js 0.10.33 (x64) and npm.
C:\Users\saiki>install -g phonegap
'install' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\saiki>npm install -g phonegap
/
> ws#0.4.31 install C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\nod
e_modules\connect-phonegap\node_modules\socket.io\node_modules\engine.io\node_mo
dules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
\
C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-ph
onegap\node_modules\socket.io\node_modules\engine.io\node_modules\ws>node "C:\Pr
ogram Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\n
ode-gyp\bin\node-gyp.js" rebuild
/
> ws#0.4.31 install C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\nod
e_modules\connect-phonegap\node_modules\socket.io\node_modules\socket.io-client\
node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\saiki\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-ph
onegap\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.
io-client\node_modules\ws>node "C:\Program Files (x86)\nodejs\node_modules\npm\b
in\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! File: C:\Users\saiki\AppData\Roaming\npm-cache\lodash\2.4.1\package\pac
kage.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:\Users\saiki
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! file C:\Users\saiki\AppData\Roaming\npm-cache\lodash\2.4.1\package\pack
age.json
npm ERR! code EJSONPARSE
npm ERR! not ok code 0
C:\Users\saiki>
please reply me as soon as possible.
Some text to make this post work or just to get submitted
Thanks in advance

npm package build failing, how best to debug?

I'm trying to install a mysql node package on Mac OS X. I'm trying to run a client project locally.
I have node and npm installed already and they work fine, other packages have installed fine. I've also compiled/installed the full LAMP stack.
When the build below fails, I'm not seeing any error messages that are helpful - just information about a library not being found. Without knowing what it can't find, I can't fix it.
Any advice? MySQL has been installed the standard way - downloaded packages, ./configure'd, make/install.
$ npm install mysql-libmysqlclient
npm http GET https://registry.npmjs.org/mysql-libmysqlclient
npm http 304 https://registry.npmjs.org/mysql-libmysqlclient
> mysql-libmysqlclient#1.3.3 install /Users/botskonet/node_modules/mysql-libmysqlclient
> node-gyp rebuild
info it worked if it ends with ok
spawn python [ '/Users/botskonet/.node-gyp/0.6.12/tools/gyp_addon',
'binding.gyp',
'-I/Users/botskonet/node_modules/mysql-libmysqlclient/build/config.gypi',
'-f',
'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings.o
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_connection.o
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_result.o
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_statement.o
SOLINK_MODULE(target) Release/mysql_bindings.node
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [Release/mysql_bindings.node] Error 1
ERR! Error: `make` failed with exit code: 2
at Array.0 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:176:25)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok
npm ERR! mysql-libmysqlclient#1.3.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the mysql-libmysqlclient#1.3.3 install script.
npm ERR! This is most likely a problem with the mysql-libmysqlclient 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 their info via:
npm ERR! npm owner ls mysql-libmysqlclient
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "mysql-libmysqlclient"
npm ERR! cwd /Users/botskonet/Sites/SportsBuddies
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.15
npm ERR! code ELIFECYCLE
npm ERR! message mysql-libmysqlclient#1.3.3 install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/botskonet/Sites/SportsBuddies/npm-debug.log
npm not ok
Look at the dependencies section in README and issues #107. To build mysql-libmysqlclient you should install both libmysqlclient and development headers for it, add path to your MySQL bin dir to $PATH and path to your MySQL lib dir to $DYLD_LIBRARY_PATH.