Error after installing Chilkat-11 in windows10 - javascript

I'm getting this error message, After i installing CHILKAT with this command line in NodeJS(version v12.6.0):
npm rebuild #chilkat/ck-node11-win64
Waiting foError: The module
'\?\c:\APEX\Projets\PDF_SignElec\WS\Projets\node_modules#chilkat\ck-node11-win64\chilkat.node'
was compiled against a different
Node.js version using
NODE_MODULE_VERSION 67. This version
of Node.js requires
NODE_MODULE_VERSION 72. 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:817:18)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (c:\APEX\Projets\PDF_SignElec\WS\Projets\myExample_5.js:17:19)
at Module._compile (internal/modules/cjs/loader.js:773:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
r the debugger to disconnect...

I forgot to post this update. The Chilkat lib for Node.js 12 is available at https://www.npmjs.com/package/#chilkat/ck-node12-win64

You need to rebuild the binary.
Try the following:
npm rebuild #chilkat/ck-node11-win64 --update-binary

Look here at the history of NODE_MODULE_VERSION numbers paired with Node.js version numbers: https://nodejs.org/de/download/releases/
NODE_MODULE_VERSION 67 is equivalent to Node.js 11.* The Chilkat module #chilkat\ck-node11-win64 is correctly built with NODE_MODULE_VERSION 67.
However, the version of Node.js you are currently using must not be Node.js 11, because the error message says "This version of Node.js requires NODE_MODULE_VERSION 72". You must be using Node.js 12.. Chilkat will be releasing for Node.js 12. this coming week.

Related

Ember.js - Error when running ember --version command

I am trying to run an ember.js app on my laptop but after installing the ember-cli and trying to run ember --version command I get an error.
To install ember-cli I used the following command - npm install -g ember-cli
It is probably important to mention that when I run ember --version command outside of the app directory it works, but when I run it inside app directory it crashes and gives error.
Node.js version - 8.11.3
This is the error that I get:
ember --version
/Users/user/go/src/github.com/apps/app/node_modules/ember-cli/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/user/go/src/github.com/apps/app/node_modules/ember-cli/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
As suggested in comments by Buck Doyle I changed Node.js version to 14.5.0 and ran ember --version command again, but I got a different error this time:
Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v3.13.1
Stack Trace and Error Report: /var/folders/bt/p_dtgwnd23gbv8nc7v_wpzmr0000gn/T/error.dump.ddc14c42b05e40a5181262bd0b9ad027.log
It is probably important to mention that when I run ember --version command outside of the app directory it works, but when I run it inside app directory it crashes and gives error.
Just wanted to answer this small piece. When you run ember inside of a directory with a package.json that includes ember-cli it will run the version of ember installed there. This is really nice when you're moving between a few apps with different versions of ember-cli, but can be surprising in situations like this.
replace catch with catch (error)
just had the same problem and solved it by replacing catch with catch(error) so you need to add (error) next to each catch.
i needed to change this in about 10 files. so you gotta change every time and run it so you see the new location of the error. best of luck

invalid ELF header in node.js on linux putty

I am facing the error invalid ELF header when I'm trying to run my node.js project on my printer having linux os using putty. The project was developed on windows. I'm attaching the whole error that I'm receiving. Please help.
stack=[Error: /sirius/rw/test/node-v8.11.1-linux-armv7l/node_modules/ref/build/Release/binding.node: invalid ELF header,
at Object.Module._extensions..node (module.js:681:18),
at Module.load (module.js:565:32),
at tryModuleLoad (module.js:505:12),
at Function.Module._load (module.js:497:3),
at Module.require (module.js:596:17),
at require (internal/module.js:11:18),
at bindings (/sirius/rw/test/node-v8.11.1-linux-armv7l/node_modules/ref/node_modules/bindings/bindings.js:81:44),
at Object.<anonymous> (/sirius/rw/test/node-v8.11.1-linux-armv7l/node_modules/ref/lib/ref.js:5:47),
at Module._compile (module.js:652:30),
at Object.Module._extensions..js (module.js:663:10)]
Because the project was developed on windows; npm needs to compile some node modules specially for the linux OS, so simply using the modules as is won’t always work.
First remove the node modules:
rm -rf node_modules/
Then generate the same modules for linux using the following command:
npm update
I hope this helps

node.js const R = require('ramda'); - SyntaxError: Use of const in strict mode [duplicate]

I am trying to login on facebook.com with selenium-webdriver.
var webdriver = require('selenium-webdriver'),
By = require('selenium-webdriver').By,
until = require('selenium-webdriver').until;
var driver = new webdriver.Builder()
.forBrowser('firefox')
.build();
driver.get('https://www.facebook.com/login');
driver.findElement(By.id('email')).sendKeys('****');
driver.findElement(By.id('pass')).sendKeys('*****');
driver.findElement(By.id('loginbutton')).click();
driver.findElement(By.linkText('Settings')).then(function(element) {
console.log('Yes, found the element');
}, function(error) {
console.log('The element was not found, as expected');
});
driver.quit();
It is giving error:
/home/shubham/node_modules/selenium-webdriver/index.js:25
const builder = require('./builder');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/shubham/Music/amazon_login/test_22_4_16/sel_login.js:1:79)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
node --version v0.10.37
npm --version1.4.28
protractor --version Version 3.2.2
selenium-webdriver#2.53.1
Updating nodejs solved the issue:
npm cache clean -f
sudo npm install -g n
sudo n stable
node --version
node app.js
You have to run the second and third command as root/administrator.
n stable wouldn't do the trick for me. On the other hand,
nvm install stable
That actually got me to last nodejs version. Apparently n stable won't get pass v0.12.14 for me. I really don't know why.
Note: nvm is Node Version Manager, you can install it from its github page. Thanks #isaiah for noting that nvm is not a known command.
For me it was more simple to solve, just going to the Node web site, get and install the LTS version.
Update your node and it will resolve this problem.
Updating NodeJS solves this problem.
But, after running sudo npm install -g n you might get following error:
npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference
In order to overcome this error, try upgrading openssl using the below command:
sudo yum update openssl
That error means your node's publish is low than the need.
carefully to update the node of your computer.

Electron Native Addon: Version missmatch

I am trying to create a simple example Native addon for Electron. However, keep running into this version miss match issue. I have .nvmrc files for both my electron project and the addon project (using node 7.4.0).
Electron 1.6.7
Node 7.4.0
Nvm 0.33.2
NPM 4.0.5
The Error
App threw an error during load
Error: The module '/Users/mikepriest/source/Browser/exambrowser-electron/app/native/prebuilt/addon/build/Release/native_rt.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/mikepriest/source/Browser/exambrowser-electron/app/main.dev.js:20:10)
at Object.<anonymous> (/Users/mikepriest/source/Browser/exambrowser-electron/app/main.dev.js:217:3)
Tried solutions
1. Tried using
./node_modules/.bin/electron-rebuild
2. Tried rebuilding my addon
nvm use 7.4.0
npm rebuild
Still get the error.
Update: found this post, but solution didn't work for me either.

Trouble installing js-yaml NPM package dependancies on Ubuntu 64 bits

I am trying to get my own project written on OSX to build on Ubuntu. It uses several npm packages to build itself. A few of them depend on the npm package js-yaml, which in it's turn depends on a package called 'esprima'. A fresh Ubuntu 14.04 installation gives me the error that this package can not be found:
module.js:340
throw err;
^
Error: Cannot find module 'esprima'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/michahell/Documents/projects/pinbored-webkit/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js:4:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm ERR! weird error 8
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
The output tells me that it might have something to do with the legacy binary node, but i should have solved this problem by symlinking node to point to nodejs, using this S.O. post:
nodejs vs node on ubuntu 12.04
So, what is causing npm / node to not be able to find or install this package?
So i have apparently solved this by manually installing the missing node module:
npm install esprima
Apparently, the npm module requiring this esprima module could just find it if it was 'locally' npm installed. If this is intended / deterministic behaviour, that's nice to know :)

Categories