How to get mysqlx npm package? - mysql

I want to use MySQL document store. For this, I have gone through MySQL documentation. As per documentation, I need to use 'mysqlx' npm package. But when I searched for 'mysqlx' package on npm website. I got '#mysql/xdevapi' package. I am confused which npm package should I use for MySQL document store.
Kindly suggest.

Changes in MySQL Connector/Node.js 1.0.4 (2016-10-10, Milestone 3):
Changed package name from mysqlx to #mysql/xdevapi
In our application folder copy the MySQL Connector/Node.js tar.gz file.
Once it has copied, run the following command to add the package to our application:
$ npm install mysql-connector-nodejs-1.0.5.tar.gz
From MySQL Connector/Node.js::README.md:
Installation
------------
This library is organized in a way that it can be installed using Node.js's npm
tool into your project:
`npm install mysql-connector-nodejs-1.0.5.tar.gz`
or diectly from npmjs.com:
`npm install #mysql/xdevapi`
Please refer to http://npmjs.com for more information on npm.

Related

node-gyp configure "binding.gyp not found (cwd: D:\MyProject) while trying to load binding.gyp"

I searched many and installed all necessary packages they said,
npm install --global --production windows-build-tools
node-gyp --python /path/to/python2.7
I have vs2017 installed in my win10 pc, I am using last versions of nodes tools
node -v //8.12.0
npm -v //6.4.1
I tried remove nodejs and reinstall to start fresh install but stuck in this step each,
here my .npmrc content;
strict-ssl=false
node_gyp=node C:\Users\ASUS\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js
msvs_version=2015
python=C:\Python27\python.exe
GYP_MSVS_VERSION=2015
ss of powershell, (node-gyp configure)
it looks for a file called 'binding.pyp'
If I add that file manually errormessage changes.. but other examples dont create any file they just install packges and run..
How can I fix this I searched on net many and did all advices(install ms build tools set msvs version 2017)

installing a downloaded library from github into vue project instead of just using npm

I'm having no luck installing https://github.com/MadimetjaShika/vuetify-google-autocomplete library using npm. I'm new to using vue, and I'd like to install the prerelease developers build, 2.0.0-Alpha.9, as the old one doesn't work with my version of vuetify.
I've downloaded and extracted the zip file and then used npm install (filepath of the downloaded folder), however when i run the project I get a 'can't find module 'vuetify-google-autocomplete' error. I've only installed packages directly via npm before so I'm not sure what I'm doing wrong.
You can install a specific version of a npm module by using npm tags
npm i vuetify-google-autocomplete#2.0.0-Alpha.9
You are unable to run it because what you downloaded is an npm repo by itself.
Go to the source folder , run the command npm install , then npm run build, copy the dist folder output to your project. How include that as a module and try.

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

Running gulp in dreamhost VPS

Since the last dreamhost update which banned VPS users from accessing root/administrator. I am wondering how to do i install GULP in my hosting as it looks like we need admin access to install that and which dreamhost clearly denies it to give access.
So the problem is there are several tasks i need on my server to accomplish via GULP.
Do we have any alternative/Solution to this problem? (except changing the hosting service :))
I'm fed up of not being able to implement my production code in production environment.
thanks
DreamHost VPS are managed servers, they try to strike a balance between giving more computing power and isolation to customers (as opposed to shared hosting) while taking some management burden off of customers hands. This results in a compromise where you don't have to care about the underlying OS and basic services at all, and focus on your applications... but you're limited somewhat to what you can install on the machine.
The good news is that you can manage npm packages as an unprivileged user. While I am not a node expert, I have managed to upgrade npm and install gulp and all dependencies on my local user.
I first created a new dir for my version of npm (mkdir npm) then set the npm prefix to it
$ npm config set prefix ~/npm
Then it's time to install a newer version of npm in that dir:
$ npm install -g npm
After that's done, update the $PATH variable in your .bash_profile and in the current session, too export PATH="$HOME/npm/bin:$PATH" and confirm with a which npm that the npm command bash will execute is /home/$YOUR_VPS_USER/npm/bin/npm.
Now you can install the rest:
npm install -g bower
npm install -g grunt-cli
npm install -g gulp
npm install -g yo
If you need to have more power and accept the responsibilities of running an unmanaged server, DreamHost Cloud is more for you though.

Azure Website Instance not running defined Node Version in Package.json

Currently in Azure I am utilizing a 'Azure Website' instance to try and run Docpad (NodeJS App). Within my package.json file I have the following defined..
"engines": {
"node": "0.10.21",
"npm": "1.x"
},
I have tried numerous different entries, from 0.10.x to 0.8.x all listed here => http://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/
The problem is that Docpad is using Dependencies with Semver Entries and Azure seems to be ignoring my defined Node version entirely, as there are errors such as...
npm WARN engine docpad#6.69.2: wanted: {"node":">=0.8","npm":">=1.2"} (current: {"node":"0.6.20","npm":"1.1.37"})
Because of this, I am getting critical/failure errors when NPM goes to install Docpad due to dependencies such as this...
npm ERR! Error: No compatible version found: rimraf#'^2.2.8'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","1.0.1","1.0.2","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","2.0.0","2.0.1","2.0.2","2.0.3","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.2.0","2.2.1","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.2.8"]
I have even gone as far as to try printing the Node Version in my deployment script, only to have it return the Environment Variable Azure supposedly honors, but it is clearly invalid.
All I am trying to do is deploy a Docpad website on Azure and I am dumbfounded as to how this is so difficult to to just use a semi-recent version of node in Azure. Any help at all would be greatly appreciated!
node and npm are now npm packages that can be installed as dependencies of your project, so it will run with the correct versions once its dependencies are installed.
However, to install those packages you will need to start with newer versions than the ones you have in your engines section:
Without npm >= 3 installing the node package will break your system by removing the existing version of node too soon
Without node >= 4 the npm package won't work (it isn't specific as to what goes wrong)