npm install error, is node-gyp mojave problem? - node.js

I can't resolve this error !! I'm getting crazy:
Here is the error:
gyp ERR! stack Error: Can't find Python executable "/path/to/python27/python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:149:21)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.3.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/federicofrydman/Desktop/glamitGitHub/front-quiz/node_modules/fibers
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-gyp exited with code: 1
This was suggested:
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: sudo apt-get install g++ build-essential
RHEL users please run: yum install gcc-c++ and yum groupinstall 'Development Tools'
Alpine users please run: sudo apk add python make g++
sh: nodejs: command not found
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers#3.1.1 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers#3.1.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! /Users/federicofrydman/.npm/_logs/2019-07-02T03_47_12_405Z-debug.log
Using the following tools:
1.MOJAVE 10.14.5
2.XCODE 10.2.1
3.PYTHON 2.7

Issue seems to be with fibers#3.1.1 which is not supported in node version 12.
Fix it by removing my latest nodejs, 12.3.1, and installing the previous stable version of 11.
https://nodejs.org/download/release/v11.15.0/

Related

Unable to install NPM

I am trying to install NPM on a repository that I have locally cloned from GitHub. This is the error that I receive. Please let me know what I should do to resolve this.
Thank You!
npm ERR! path D:\Avin Dev\portfolio\node_modules\fibers
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node build.js || nodejs build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#3.8.0
npm ERR! gyp info using node#16.14.0 | win32 | x64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: C:\Program Files\Python38\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "<string>", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:399:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Avin Dev\\portfolio\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd D:\Avin Dev\portfolio\node_modules\fibers
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! node-gyp exited with code: 1
npm ERR! Please make sure you are using a supported platform and node version. If you
npm ERR! would like to compile fibers on this machine please make sure you have setup your
npm ERR! build environment--
npm ERR! Windows + OS X instructions here: https://github.com/nodejs/node-gyp
npm ERR! Ubuntu users please run: `sudo apt-get install g++ build-essential`
npm ERR! RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
npm ERR! Alpine users please run: `sudo apk add python make g++`
npm ERR! 'nodejs' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! A complete log of this run can be found in:
When a binary package is used in compatible environment, usually a precompiled binary is installed. That NPM tries to compile it is a sign that a combination Node version, CPU architecture and OS isn't supported by specified version of a binary package. fibers is a binary package known to be incompatible with Node 16.
One option is to modify the project to not depend on fibers. In the context of Vue it's likely node-sass that depends on fibers and it needs to be migrated to sass.
Another option is to downgrade to Node 14 and install the project as is.

fibers#1.0.15 install node_modules/fibers node build.js || nodejs build.js

I'm have error when trying to run sudo npm install in node 10, in local server its work perfect.
error:
fibers#1.0.15 install /home/tickets/www/tickets_parser/node_modules/fibers
node build.js || nodejs build.js
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/tickets/www/tickets_parser/node_modules/fibers/build'
gyp ERR! System Linux 4.4.0-97-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/tickets/www/tickets_parser/node_modules/fibers
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: sudo apt-get install g++ build-essential
Alpine users please run: sudo apk add python make g++
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/tickets/www/tickets_parser/node_modules/fibers/build'
gyp ERR! System Linux 4.4.0-97-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/tickets/www/tickets_parser/node_modules/fibers
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: sudo apt-get install g++ build-essential
Alpine users please run: sudo apk add python make g++
npm WARN tickets_parser#0.0.0 No description
npm WARN tickets_parser#0.0.0 No repository field.
npm WARN tickets_parser#0.0.0 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fibers#1.0.15 install: node build.js || nodejs build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#1.0.15 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/tickets/.npm/_logs/2018-05-14T19_08_18_241Z-debug.log
thanks

how to install mariasql with nodejs 4.x on ubuntu 14?

I'm trying to set server with node.js and mariaDB on Ubuntu at EC2 of AWS.
here is the versions what I installed..
Ubuntu 14.04.3 LTS
MariaDB 10.1.14
NodeJS 4.4.7
now I want to connect with node.js and mariaDB, so I tried to install mariasql
with this command..
$sudo npm install mariasql
but this errors occurred..
========================================================================
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Linux 3.13.0-74-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/node_modules/mariasql
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "mariasql"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! mariasql#0.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mariasql#0.2.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the mariasql 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 mariasql
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls mariasql
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/npm-debug.log
========================================================================
already installed node-gyp.
I tried old version of node, it was 0.10.x but it didn't work as well.
what did I wrong with it?
Do you have build-essential installed?
sudo apt-get install build-essential
Also, did you install node-gyp as global?
sudo npm install -g node-gyp
This is important, please see there is -g flag

Can’t deploy app on Ubuntu 14.04 LTS after upgrade to Meteor 1.3

Everything worked fine until Meteor 1.3 upgrade. Now I've even tried to reconfigure new Ubuntu 14.04 LTS droplet from skratch, no success. Here is what I'm doing:
Installed NodeJS 0.10.x and Mongo.
curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash -
apt-get install nodejs
apt-get install mongodb-server
Built app.
meteor build --architecture os.linux.x86_64
Uploaded it to server and extracted to /home/production and tried to install dependencies.
cd /home/production/bundle/programs/server && npm install
And here we are:
> fibers#1.0.8 install
/home/production/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js
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 (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.16.0-0.bpo.4-amd64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/production/bundle/programs/server/node_modules/fibers
gyp ERR! node -v v0.10.43
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
Build failed
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 (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.16.0-0.bpo.4-amd64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/production/bundle/programs/server/node_modules/fibers
gyp ERR! node -v v0.10.43
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
Build failed
npm ERR! fibers#1.0.8 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fibers#1.0.8 install script.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-0.bpo.4-amd64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/production/bundle/programs/server
npm ERR! node -v v0.10.43
npm ERR! npm -v 1.4.29
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I even tried to use exact "meteor" versions of NodeJS and NPM: 0.10.43 and 2.14.22. No success. What else can I try?
So simple:
sudo apt-get install build-essential
I have no idea how could it work before 1.3 update without make. Maybe something really changed in Meteor itself in 1.3.

node-gyp rebuild fails while installing node modules

I am trying to install node_xslt module in node 0.12 but it is failing. I have python version 2.7 and node-gyp version 2.0.2.
Here is the error stack-
> node_xslt#0.1.9 preinstall /home/ritesh/Ritesh/projects/applane1/node_modules/node_xslt
> node-gyp rebuild
/bin/sh: 1: xml2-config: not found
gyp: Call to 'xml2-config --cflags' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ritesh/Ritesh/projects/applane1/node_modules/node_xslt
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node_xslt"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! node_xslt#0.1.9 preinstall: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node_xslt#0.1.9 preinstall script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the node_xslt 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_xslt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /node_modules/npm-debug.log
This error comes while installing other modules as well i.e. xslt4node.
Just had the same problem, though the question is 5+ years old, might be useful for somebody else. I solved my problem switching to a different version of node with nvm: nvm use 12 in my case.
Try installing compile tools
sudo apt-get install python3 g++ make python3-pip
Works for me
Try installing sudo apt-get install libxml2-dev

Resources