728x90
App threw an error during load
Error: The module '\\?\C:\Users\talon\OneDrive\Desktop\focus\node_modules\cap\build\Release\cap.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func (electron/js2c/asar.js:155:31)
    at process.func [as dlopen] (electron/js2c/asar.js:155:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
    at Object.func (electron/js2c/asar.js:155:31)
    at Object.func [as .node] (electron/js2c/asar.js:155:31)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (internal/modules/cjs/loader.js:685:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (C:\Users\talon\OneDrive\Desktop\focus\node_modules\cap\lib\Cap.js:3:13)

 

 

 

Thank you this helped! Just for reference if anyone is having the same issues, here are the commands you need to run that come from the link provided by @mscdex:

npm install --save-dev electron-rebuild

 

 

 

was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module

I see, thanks for pointing that out!

I get it now: npm rebuild uses my local node (ABI 72), which isn't what electron has.

The question is, how can I get electron rebuild to work? I have the latest electron-rebuild, v 1.8.6.

This is what I've tried so far:

  • If I run npx electron-rebuild right now, then run Electron, I get the same 72 vs 73 error.
  • If I then remove node_modules and npm install, then the error becomes 48 vs 73.
  • If I then downgrade electron to ^5, re-install node_modules, error goes to 47 vs 70.
  • If I then run electron-rebuild, no change. 47 vs 70
  • If I then run npm rebuild, it goes to 72 vs 70 (seems to make sense, my node is v12, Electron v5 expects a lower ABI version).

Thanks for the help!

728x90

 

에러에서 npm과 node가 latest_version 인지 확인하라는 메세지가 나온다.

환경단에서 gauge.isEnabled() 와 같이 등장할 수 있다.

 

1.

$ npm install latest-version

 

전체 환경인 상태에서 npm의 버전을 latest 로 올려준다.

또한, package-lock.json 이 found 되는 경우에도 라이브러리 설치에 여러모로 영향을 미치기 마련인데, 

 

package 관리자를 yarn 을 쓴다고 해서, yarn 으로 무조건 조져도 되는 것도 아니고... 

hang up 걸린 상태가 종종 등장하기 때문에, 

 

하드웨어 패키지 내부에서 npm install 대신에 yarn 을 설치해서 잡아줬어야 했고

전체 환경에서는 windows-build-tools 와 node-gyp 를 잡아줘야 했다.

 

어쨋든 @4.0.0 으로 설정하게 가버리면 완전 나가리가 된다.

728x90

결국 앞전에서 삽질 하던것은 실패했다.

 

그래서 에러에 대해서 읽어보았다.

 

1.

 

그래 에러형이 까라면 까야지.

버전도 맘에 안들고 여러모로 맘에 안드니 "Desktop development with C++ "  Workload 환경이 맘에 안든다는 이야기고, 빡치면 문서 찾아보라그래서 들어가봤다.

 

 

2.

github.com/nodejs/node-gyp#on-windows

 

nodejs/node-gyp

Node.js native addon build tool. Contribute to nodejs/node-gyp development by creating an account on GitHub.

github.com

역시 킹허브 갓허브에는 해외 개발자들 답게 문서정리를 굉장히 잘해놓았다.

처들어가보니, 환경부터 수정해보란다.

 

On Windows

Install the current version of Python from the Microsoft Store package.

Install tools and configuration manually:

$ npm config set msvs_version 2017

 

If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.

To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".

 

 

3. 

응 형 수정해봤는데, 안되더라고... 근데 위에 보니까 링크를 또 남겨놨더라?

Visual Studio Build Tools 를 깔거나 (이건 실패했잖아), 그래서 Visual Studio 2017 Community 를 깔라길래 또 처들어갔다. (그러니까 대충 기반환경 만들어놓고 쌉쳐라 이런거지 뭐)

 

 

 

 

4.

느낌상 이번엔 되지 않을까? 싶은데 되야지 안되면 진짜 죽.. 아니야

728x90

$ npm install --global --production windows-build-tools

 windows-build-tools 를 설치하다보면, 도중에 stuck (hang up)이라는 현상이 발견하게 되는데, 

대부분 해외 포럼에서는 windows-build-tools@4.0.0 을 설치하라고 하지만

 

문제는 난 그 다음에 node-gyp 를 설치하고 나서, working tree 의 dependency 때문에 작동을 잘 할 수 없어서

electron이 잘 작동하지 않고 에러를 뱉기 시작했다.

 

그래서 그냥 에러가 써있는대로 가서 폴더를 날려버렸다.

1.

..\Program Files (x86)\Microsoft Visual Studio\VS2017 

에 들어가면 맘에 안드는 녀석ㅇ ㅣ있는데 그녀석 부터 일단 날려버리고...

 

 

 

2.

그 다음에 명령어를 때려박아준다.,

$ npm remove windows-build-tools@4.0.0

install 의 반대말은 remove 아니겠는가? 그래서 때려박았더니 아주 잘 지워진다.

그것도 dependency 까지 확인하면서 친절하게 지워준다.

 

원래는 npm cache clean 을 넣다가도, 맘에안든다고 --force 를 주라길래 그렇게 했었는데도 안되길래 이렇게 넣어버렸다.

 

위에 @4.0.0 을 표시해준건 VS2015 환경에 대한 세팅을 돌려버리기 위해서다

 

 

 

3.

$ npm remove windows-build-tools

 

그러고 나서 또 꼬여있을 녀석을 위해서 한번더 지워준다

 

 

 

4.

그리고 나서, Stuck 구간이 발견되는 Python 2.7도 Uninstall 해준다.

 

 

5.

$npm install --global --production windows-build-tools

 

6.

그리고 다시 명령어를 때려박아서 위처럼 얌전히 기다린다. 보통 4분정도면 pass 된다고 하는데, 안되면 빡칠 것 같다.

 

 

 

 

+ Recent posts