Meteor: unable to install mysql in my meteor app - mysql

I have cloned one of my local project to another folder. I faced some mysql issues. So, I am trying to install mysql in my meteor app, but it always throwing me a error as 'couldn't install npm mysql package'. I have googled related to this issue, but none of them get resolved. I appreciate if anyone help me.
meteor npm install mysql

As mentioned in the comment:
Try:
npm config set strict-ssl false
and then
npm config set registry http://registry.npmjs.org/

Related

Library not loaded: libssl.1.1.dylib (LoadError) when trying to run rails server and connect to mysql

Recently I updated my MacOS to Monterey 12.3 which included updates for xcode.
After that I am not able to run the rails application that I have been working on. I keep getting this error when I try to spin up the server.
I have tried installing and removing mysql different ways. Both using a brew install and DMG file from mysql website.
I am able to access the database instance through my command line but I think they issue is that it I can't connect from application. Anyone else having similar issues?
here is the full error
/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require': dlopen(/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): Library not loaded: libssl.1.1.dylib (LoadError)
Referenced from: /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
Reason: tried: 'libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file), '/Users/gus/gus_project/Gus2021/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file) - /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
If anyone runs into this problem, this is what solved my issue.
paths to openssl needed to be updated.
gem install mysql2 -- --with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib --with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
bundle install
Obviously this is for openssl install with brew install version 1.1
I was able to get it working with this:
brew install openssl
bundle config build.mysql2 --
--with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib
--with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
brew install openssl#1.1
Do all the export path things, and make sure to link openssl#1.1
brew link openssl#1.1 --force
I had similar issue with postgresql, which raises error while running psql -d database:
Library not loaded: '/opt/homebrew/opt/openssl#1.1/lib/libssl.1.1.dylib'
In my case which I have openssl#3 and openssl# the solution is:
brew install openssl#1.1
brew link openssl#1.1 --force
Then reinstall postgresql with homebrew.
I also had my zshrc exporting the following ENV variable though I'm not quite sure if it's related:
export PATH="/opt/homebrew/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
For someone who runs into the same issue as mine!

gulp - internalBinding is not defined

I'm getting this error when I try to run the command gulp watch-bs for my UnderStrap child theme for WordPress. I've been using this command for a year with no problems, but I received this error today when I updated my node and npm to their latest versions.
ReferenceError: internalBinding is not defined
at internal/util/inspect.js:31:15
at req_ (C:\xampp\htdocs\node_modules\natives\index.js:137:5)
at require (C:\xampp\htdocs\node_modules\natives\index.js:110:12)
at util.js:25:21
at req_ (C:\xampp\htdocs\node_modules\natives\index.js:137:5)
at require (C:\xampp\htdocs\node_modules\natives\index.js:110:12)
at fs.js:42:21
at req_ (C:\xampp\htdocs\node_modules\natives\index.js:137:5)
at Object.req [as require] (C:\xampp\htdocs\node_modules\natives\index.js:54:10)
at Object.<anonymous> (C:\xampp\htdocs\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:1:99)
I've read here that, in order to resolve the issue, I need to run this command:
npm install natives#1.1.6
but this did not help resolve the issue.
Am I missing something else?
I ran into the same issue as you. To fix it, I added the following to my package.json in the devDependencies section
"natives": "^1.1.6"
I had the same error after upgrading node to v10.16.0
I ran the following which solved my issue:
rm -rf node_modules
rm package-lock.json
npm cache clean --force
npm install
After closer inspection, it would seem that the generated tree in package-lock was outdated.
I also faced the same problem and then I fixed by the following command:
npm install natives#1.1.6
May be helpful if someone having same issue.
updating node to latest version requires above package.
I recently ran into the same problem after installing node. Similar to #Dv-Learner answer, What fixed it for me was:
npm install natives#1.1.6
npm rebuild node-sass
the bit about rebuild node-sass was required for my machine (Windows)
#Student 22, in addition to Lloyd's solution, I simply updated my version to the most recent version for gulp using the command below ( Local Version 3.9.1 to Local Version 4.0.0) and I didn't run any additional commands.
npm install gulp-update
Reference: https://github.com/nodejs/node/issues/24985
Good luck!
In my case, I downgraded my node version from 10.16.0 to 8.11.4 which was required by my current project by this command
sudo n 8.11.4
Had the same error. Solved it by installing graceful-fs.
It seems that natives package is now deprecatd and you should install graceful-fs instead.
I had node v10.16.1 and glup local version 3.9.1. I ran 'npm install graceful-fs' and glup no longer gave the error in this question.
(Can't comment yet, so an answer).
Try this, it's working for me:
npm install -g graceful-fs graceful-fs#latest

Electron cannot find module mysql

So i've been creating a desktop application using electron. The problem is that when I run my application using npm it doesn't show any error about a missing module but when i package it and run it this error shows
I'm sure that i've install mysql module using npm install -g mysql and npm install mysql in the project directory. It's all working fine when i run the unpacked version of the application
Assuming that you have installed mysql if not please install mysql npm install mysql --save-dev
Hi I also ran in same error I tried everything possible but nothing seems to work , after several hit and trial I was able to fix it and in the end realize that it was all happening because of
When I installed MySQL module I never saved it (--save-dev)
And electron-packager was not able to locate it when I pack it because was not mention in package.json
A solution might locate mysql folder in node_module folder and delete
then install it npm install mysql --save-dev
or manually
add it under dependencies in package.json file

Can't use npm_modules after installation

I'm starting a project where im going to use AngularJS, NodeJS and MySQL. This is my first real web application, and it's also the first time im using npm.
I've installed Node from their official website, and when i write npm install the node_modules comes to the project directory.
The problem occurs if I try to use any of the installed npm_modules. I tried to download mysql, and the installation worked, but when i type mysql -p i get: "bash: mysql: command not found"
I've also tried to install it with npm install mysql -g, but it still doesn't work.
If it means anything my $PATH is /usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/bin
The mysql npm package contains just the nodejs client library for mysql. You need to install the mysql server separately using the appropriate method for your OS.
it looks like you have not installed mysql on your system.
install mysql server using the following command
sudo apt-get install mysql-server

Installing sphinx on Dreamhost

I'm following this tutorial: http://hughevans.net/2009/03/10/thinking-sphinx-dreamhost
I'm run into an issue when I run:
./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local/
I get an error: "cannot find MySQL include files."
I've checked and cant find mysql_config, so I'm guessing the mysql-devel package isn't installed.
My next step is to install the mysql-devel package from source, but I'm thinking that I may be missing something.
Has anyone found a solution for this issue?
(I'm using a VPS)
My next step is to install the mysql-devel package from source
Why from source?
Suggest just using a package manager to install the package.
I solved my problem by using a different user with root access.
With that user I installed sphinx with APT.
sudo apt-get install sphinxsearch