Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iconv mode issue #141

Closed
creaz35 opened this issue Jun 8, 2022 · 4 comments
Closed

Iconv mode issue #141

creaz35 opened this issue Jun 8, 2022 · 4 comments

Comments

@creaz35
Copy link

creaz35 commented Jun 8, 2022

Hi Guys,

I tried everyhting but i can't make it work. See below.

I have removedn ode_modules also and run npm i again without success, i also tried npm rebuild.

node:20140) UnhandledPromiseRejectionWarning: Error: The module '\?\C:\Users\Brian\Desktop\projects\app-desktop\node_modules\ref-wchar-napi\node_modules\iconv\build\Release\iconv.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).

Code:

const activeWindowPage = require('active-win');

`function displayActiveWin() {

(async () => {
    var options = [];
	console.log(await activeWindowPage(options));
	/*
	{
		title: 'Unicorns - Google Search',
		id: 5762,
		bounds: {
			x: 0,
			y: 0,
			height: 900,
			width: 1440
		},
		owner: {
			name: 'Google Chrome',
			processId: 310,
			bundleId: 'com.google.Chrome',
			path: '/Applications/Google Chrome.app'
		},
		url: 'https://sindresorhus.com/unicorn',
		memoryUsage: 11015432
	}
	*/
})();

}`

setInterval(displayActiveWin, 5*1000);
@creaz35
Copy link
Author

creaz35 commented Jun 8, 2022

λ node -v
v16.15.1

@sindresorhus
Copy link
Owner

This is a problem with the iconv dependency. Try opening a question there instead.

@creaz35
Copy link
Author

creaz35 commented Jun 8, 2022

Hi sindresorhus,

Thanks i understand but i went to the github and it says support node 12. So we cannot use activewin if we have > 12 for node?

Thanks!

ref-wchar-napi
A ref "type" implementation of wchar_t * (a.k.a. wide string) backed by "node-iconv"
Build Status Build Status

This module offers a "wide strings" (wchar_t *) implementation on top of Node.js Buffers using the ref "type" interface. Supports Node 6, 7, 8, 10, 12.

@Jannchie
Copy link

@creaz35 I Fixed this problem by build node-iconv locally and replace all the files in Release folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants