ifxnjs not supporting for the NODE_MODULE_VERSION 64 - informix

I have the Node.js version 10.13.0 and i have installed the ifxnjs and when tried to connect to the informix database i am getting the below error. i have to run my test cases using the node version 10 because the dev code is running on that version and i have to run my test cases against the dev code. Can anyone help me in resolving the below error? Does ifxnjs supports the node version 10.13.0.? Any help is appreciated.
Error: The module '\\?\C:\Project\node_modules\ifxnjs\build\Release\ifx_njs_bind.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at bindings (C:\Project\node_modules\bindings\bindings.js:81:44)
at Object.<anonymous> (C:\Project\node_modules\ifxnjs\lib\odbc.js:33:31)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)

We will plan to release this version soon. Look like you are on Windows we will provide priority for that then.

Maybe the problem is that you have upgraded nodejs and you are trying to use a node module compiled with the old version of node in the new version.
Simple solution should be to remove all the packages and install them again
rm -rf node_modules
rm -rf package-lock.json
npm i
If this doesn't fix your problem you can try to rebuild the package. This command download again the sources from internet and rebuild them.
npm rebuild ifxnjs --build-from-source
In some cases I still have the problem and the solution was to manually rebuild the module
cd node_modules/ifxnjs
node-pre-gyp rebuild
This forced the node-pre-gyp tool (the tool used by node to compila binary modules) to take the correct version of node.
These examples works if you use npm, if you are using yarn the command are pretty much the same.
Hope this helps

Related

vips/vips8 file not found #include <vips/vips8> in Ionic cordova in IOS

I found an error in sharp.
After that, I found a blog in which they ask to delete sharp from the node module and run sudo npm i.
I have gone through GitHub and write minipass - 2.7.0
After that, I got a new error in
vips/vips8 file not found #include <vips/vips8>
I'm using Ionic with Angular on Macbook
I use commands which is
1.sudo npm install
2.sudo npm i gulp-sass -ES --unsafe-perm=true
3.sudo ionic cordova platform add ios
I very recently ran into a similar issue after making some changes to a project's package.json on my Mac (not an Angular or Cordova project).
I came across this GitHub issue for the sharp package which mentioned you may need to update the globally-installed version of libvips: https://github.com/lovell/sharp/issues/1148
In my case, since I use Homebrew but had not directly installed this package previously, I was able to resolve by running brew install vips and then re-running npm install. Note that it has a lot of dependencies so installation may take some time.
Edit: if that doesn't work, you may need to try a fresh install by removing node_modules, then re-running npm i.
This might be not applicable to everyone, but remove package-lock.json and node_modules directory first and then try npm install again. (I also added the minipass in my package.json, by the way)
In my case, I had encountered the same error, but I could solve it by doing the above.

Cannot find module 'babel-eslint' (both standard and babel-eslint already installed locally)

What version of standard?
12.0.1
What operating system, Node.js, and npm version?
Windows 10,
Node v10.15.1,
NPM v.6.8.0
What did you expect to happen?
I install both standard and babel-eslint on devDependencies
(locally).
I run standard --parser babel-eslint
I get the standard use babel-eslint parser to recognize babel code style and not stating
it as style error
What actually happened?
I install both standard and babel-eslint on devDependencies (locally).
I run standard --parser babel-eslint
I get error: Cannot find module 'babel-eslint'
I read from previous issues 85 1167, it should be fixed when they are installed on the same level. But it does not happen on mine.
I have tried to put config below on package.json:
"standard": {
"parser": "babel-eslint"
}
But it does not resolve the issue.
Hi this is an old question but for who passes here in the future, those answers didn't work for me, but this one did:
npm install babel-eslint --save-dev
Try
$yarn add standard babel-eslint
I solved this by doing:
npm install -g babel-eslint

Using "npm install" to install jquery-ui

I see from here https://github.com/jquery/jquery-ui that jquery-ui's latest release is 1.11.4. However, when I use "npm install jquery-ui", it's only 1.10.3. I checked this version in node_modules/jquery-ui/jquery-ui.js.
Is there any way for me to install the latest version?
jQuery-ui specifically needs to be build after installation. To avoid this, use npm install jquery-ui-dist
T J gave the right answer, but it is a bit short / too generic.
The GitHub project is at https://github.com/jquery/jquery-ui/
So the real command would be npm install github:jquery/jquery-ui (you can even skip github: as npm defaults to it).
But this would bring you the latest, unstable version (around 1.12 at time of writing), and it didn't even work when I tried.
So it is better to fetch a tagged version:
npm install github:jquery/jquery-ui#1.11.4
Generic note: AFAIK, if the project hasn't a package.json file, this kind of install can still fail.
Here is the current latest version (1.11.4), same package that bower is using, including all themes.
npm install github:components/jqueryui#1.11.4
You can install it like
npm install github:mygithubuser/myproject
as mentioned in the install documentation

react-native UIExplorer won't open

I'm trying to view the UIExplorer on Xcode. I have followed the example and it should be simple. It says to clone react-native, cd to directory, npm install and run npm start. However when I run npm start I get the following error:
react-native#0.8.0 start /Users/chiMarvine/Projects/react-native
./packager/packager.sh || true
/Users/chiMarvine/Projects/react-native/packager/packager.js:233
const dumpName = '/tmp/dump_' + Date.now() + '.json';
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
I have no idea on how to go about this issue, the build succeeds but the simulator says the following:
Ensure the following:
-Node server is running and available on the same network - run
'npm start' from react-native root
- Node server URL is correctly set in AppDelegate
URL: http://localhost:8081?examples/UIExplorer/UIExplorerApp.ios.bundle?platform=ios&dev=true
The request has timed out
Some help would be great, thanks!
I had the same issue. My problem was that I installed node 4.2.2 with nvm but did not set it to be the default version. The shell that was running the build process had my default node.js running which was very old. To fix it, I ran:
nvm alias default 4.2.2
I have the same problem a moment ago, and my solution is update the NodeJS version to V4.0.0 , after completing, delete the react-native folder, do the original step again.
git clone https://github.com/facebook/react-native.git
cd react-native && npm install
npm start
it is working, hope this could help you.
const is ECMA6 (ES6) javascript syntax. If you have an older version of node without ES6 support you would get this error. Node 4.X versions have ES6 support. Hence upgrading solves the problem.

Cordova throws syntax error when trying to add platform

I'm trying to install Cordova and Ionic Framework on a Ubuntu server. I already used Node.js on it, so simply ran:
sudo npm install -g cordova
Then I cloned a sample project from GitHub
sudo git clone https://github.com/driftyco/ionic-weather.git
I entered the directory and tried to add the iOS platform library in order to build it:
cd ionic-weather
sudo cordova platform add ios
However it throws the following error:
Creating ios project...
/home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: 33: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Syntax error: "(" unexpected
Error: /home/benedict/.cordova/lib/ios/cordova/3.4.0/bin/create: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I've tried reinstalling Cordova in case something got corrupted, but no luck. I can't seem to find anyone else with this issue either so I'm kinda stuck. Any ideas?
This turned out to be a combination of several problems:
Ant is a required dependency, although it's not documented as a dependency as far as I can tell from any of the install guides the ionic guide or cordova guide point to. In fact I found this out by digging around SO and a few other dark corners of the internet
JDK must also be installed. (not just JRE)
2 folders have to be added to the path (for Android anyways).
Ant
This can be installed via sudo apt-get install ant.
jdk
sudo update-alternatives --config java
first, you can find out if you have jdk by running `sudo update-alternatives --get-selections | grep ^java
if you already have the jdk, you can update your jre to the jdk version using sudo update-alternatives --config java
if not, then install jdk (not just the jre), using sudo apt-get install openjdk-7-jdk
Path setting in ~/.bashrc
$ cd ~
$ sudo vi .bashrc
at the bottom, before the PATH= add the path to the bundle folders for both platform-tools folder and the tools folder under the sdk folder. Several of the guides only mention the platform-tools folder.
The guide specifically mentions ios can't be installed on Windows, but strangely leaves out Linux. This may be an oversight, but I can't be sure. There was some indication in the ionic guides that ios emulation could be done on linux, even though actual development could only be done on OSx.
the ios platform requires xcode 4.5 with cordova, which needs OSx 10.7 you basically can't add the ios platform tools on Windows or Linux. Unfortunately cordova and ionic both seem to forget Linux exists, and therefore the docs imply this will run on Linux when they note inoperability on Windows but say nothing about Linux.
Your problem is that your trying to build the app on a machine that doesnt have Mac OS installed. In order to add IOS platform you need to run this command on a mac.
Check the Prerequisites here:
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html

Resources