Error installing 'npm i' for node-red server in node.js - node-modules

I'm trying to use netbeast in my node-red server, and I am unable to install 'npm i' which is required for IoT. How can I install that in correct way?
I have tried some step by step process using "https://opensource.com/life/16/5/netbeast", but I'm getting some unidentified errors
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-win32-x64.tar.gz
node-pre-gyp
ERR! Pre-built binaries not found for sqlite3#3.1.13 and node#10.15.3 (node-v64 ABI) (falling back to source compile with node-gyp)
node-pre-gyp
ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-win32-x64.tar.gz
node-pre-gyp
ERR! Pre-built binaries not found for sqlite3#3.1.13 and node#10.15.3 (node-v64 ABI) (falling back to source compile with node-gyp)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3#3.1.13 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#3.1.13 install script.
I'm getting these type of errors and even I have tried with install 'sqllite3' modules individually but I'm getting the same errors. I have went through with
'https://github.com/mapbox/node-sqlite3/issues/758',
'"Failed at the sqlite3#3.1.13 install script 'node-pre-gyp install --fallback-to-build'" on Windows',
'Error installing sqlite3 in node.js'
even I have tried with so many else but still same problem

Related

Not able to globally install electron on MacOS due to error

I'm getting an error while trying to globally install electron, I'm not sure why.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! HTTPError: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v19.0.9/electron-v19.0.9-darwin-ia32.zip
npm ERR! at EventEmitter.<anonymous> (/usr/local/lib/node_modules/electron/node_modules/got/source/as-stream.js:35:24)
npm ERR! at EventEmitter.emit (node:events:390:28)
npm ERR! at module.exports (/usr/local/lib/node_modules/electron/node_modules/got/source/get-response.js:22:10)
npm ERR! at ClientRequest.handleResponse (/usr/local/lib/node_modules/electron/node_modules/got/source/request-as-event-emitter.js:155:5)
npm ERR! at Object.onceWrapper (node:events:510:26)
npm ERR! at ClientRequest.emit (node:events:402:35)
npm ERR! at ClientRequest.origin.emit (/usr/local/lib/node_modules/electron/node_modules/#szmarczak/http-timer/source/index.js:37:11)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:623:27)
npm ERR! at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! at TLSSocket.socketOnData (node:_http_client:487:22)
npm ERR! A complete log of this run can be found in:
For some reason I don't know, your npm tries to install Electron with the ia32 architecture, resulting in a downloadable zip file which is not provided by the Electron maintainers. That's why you're getting a 404 HTTP status code.
Going back in Electron's releases page, I cannot seem to find any darwin-ia32 assets (darwin is the codeame for macOS).
You can try forcing npm to install the appropriate architecture using
npm install --arch=x64 electron
as suggested in Electron's installation guide.

heroku push with npm problems

im trying to push my discord app to heroku but there are some problems, can someone help me?
i think this is from my npm or something idk
Resolving node version 14.x...
Downloading and installing node 14.17.1...
Using default npm version: 6.14.13
-----> Installing dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
> #discordjs/opus#0.5.3 install /tmp/build_b5827880/node_modules/#discordjs/opus
> node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! #discordjs/opus#0.5.3 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the #discordjs/opus#0.5.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! /tmp/npmcache.7tseI/_logs/2021-06-16T14_44_27_673Z-debug.log
-----> Build failed
Try to remove the node_modules folder and let heroku install them, make sure you have package.json
also check node-pre-gyp: Permission denied in heroku push

unable to install firebase tools in windows

Hi I'm unable to install the firebase tools via command prompt using admin mode and I am getting the error bellow:
F:\rnd\MyChat>npm install firebase
> grpc#1.8.4 install F:\rnd\MyChat\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.8.4/node-v57-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.8.4 and node#8.9.3 (node-v57 ABI, unknown) (falling back to source compile 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:\Users\ani\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.8.4 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.8.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
you are trying to install firebase javascript library not the firebase-tools the node module for firebase tools is firebase-tools and firebase 3.16 version and along with that in the local folder npm install node-gyp
you should run
npm install -g firebase-tools
This is something that may work, try doing the following.
npm i -g firebase-tools
Finally my issue has been resolved by following these below steps
firstly i installed npm install node-gyp in my local folder and downgraded my firebase-tools version from 3.17 to 3.16 and Mainly i disabled my Anti Virus
below is the reference link for that
https://github.com/grpc/grpc-node/issues/121
If you are using a newer version of nodejs try uninstalling and using node-v10.15.3
https://nodejs.org/download/release/v10.15.3/

npm install xml2json fail to install

I am trying to work on PUSh notifications for Android/ios using node.js.
I am getting the below error when I try to install xml2json.
Please help me to fix it
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Darwin 12.5.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/bertils/node_modules/xml2json/node_modules/node-expat
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! node-expat#2.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.0.0 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 Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "xml2json"
npm ERR! cwd /Users/bertils
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/bertils/npm-debug.log
npm ERR! not ok code 0
Looks like the make tool is not available on your system.
To fix this, you have 2 options:
If you have Xcode already installed:
Go to Xcode > Preferences > Downloads and install the component named "Command Line Tools". All the relevant tools will be placed in /usr/bin.
Alternative:
Go to https://developer.apple.com/downloads, sign in with your developer Apple ID and search for "Command Line Tools", then download and install the appropriate file.
I was also facing the same issue on linux rhel 7, see if it works for you too, what I found out was that I needed to install gcc libraries on my instance, so I went ahead and removed my node_modules folder and then ran the sudo yum group install "Development Tools", in your case you might want to find the brew equivalent sudo yum group install "Development Tools" or xcode-select --install, and I then ran the npm install again and it worked!
Hope this helps, for issues related to installing gcc libraries and Development tools, one can refer to this url also: Install gcc and dev tools or Mac OS install dev tools

Mac npm erroring with ENOENT

I'm a recent convert to Mac from Windows, and currently just trying to get my tools setup.
I first installed node using homebrew, which was giving me errors (same as what I still have). I later removed node using homebrew and installed using the pkg from the node website.
I can access node in the command line and npm. The problem is when I try to install modules on the project locally I get something like:
npm install grunt-contrib
Error extracting archive { [Error: ENOENT, open '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip']
errno: 34,
code: 'ENOENT',
path: '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip' }
Another message just above that contains:
npm ERR! phantomjs#0.2.6 install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 8
npm ERR!
npm ERR! Failed at the phantomjs#0.2.6 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.2.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib"
npm ERR! cwd /Users/davidmckeown/dev/adt-com
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
Any help figuring out what is causing problems here would be fantastic. This happens with other modules too, from what I can tell.
npm cache clean
or if installed under su
sudo npm cache clean
There was an issue 5 months ago with grunt qunit package - https://github.com/gruntjs/grunt-lib-phantomjs/issues/5.
Try to install this specific package:
sudo npm install grunt-contrib-qunit
The package that you installed is a bundle of many packages. The qunit package version was not updated explicitly to the latest version in this bundle, that's why clearing the npm cache might solve this issue.

Resources