본문 바로가기
카테고리 없음

electron 빌드 오류 in mac m1 This is not a published, standalone application and we are unable to locate the .NET Core SDK.

by 향유 2023. 1. 31.

명령어

"electron:serve": "vue-cli-service electron:serve -- --ia32 --mode none",
 
ia32 칩이 문제일거 같음(삽질)
Uncaught Exception:
Error: This is not a published, standalone application and we are unable to locate the .NET Core SDK.  Please make sure that it is installed; see http://microsoft.com/net/core for more details.
at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1138:18)
at Object.func [as .node] (electron/js2c/asar_bundle.js:5:1846)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/yongsinkwon/workspace/centumpos/node_modules/electron-edge-js/lib/edge.js:52:12)

"electron:serve": "vue-cli-service electron:serve -- --ia32 --mode none",

"electron:serve": "vue-cli-service electron:serve -- --amd64 --mode none",

아래로 변경 후

npm install 

 

npm run electron:serve - > 동일 문제 발생

 

npm run serve -> 정상 작동 : npm 문제는 아닌거 같음.

npm run electron:build ->  npm문제는 아닌거 같다는 메세지 확인

 

python 버전 확인 

 

python --version

-> 3.9

https://leesh90.github.io/environment/2021/04/03/python-install/

 

pyenv 설치  zsh 설정 변경

https://zionh.tistory.com/28

 

버전변경  재 실행

Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT

 

-> 변경안됨

https://github.com/electron-userland/electron-builder/issues/6726

 

Exit code: ENOENT. spawn /usr/bin/python error after updating macOS · Issue #6726 · electron-userland/electron-builder

Electron-Builder Version: 22.14.13 Node Version: 16.13.2 Electron Version: 17.1.2 Electron Type (current, beta, nightly): current Target: universal I recently updated my MacBook Air M1 (macOS Monte...

github.com

I'm investigating this issue right now since it's blocking my work. Here's what I've learned:

  • builder-util is trying to call python because the package dmg-builder uses python scripts
  • You can set the environment variable PYTHON_PATH to overwrite the default of /usr/bin/python, however:
  • dmg-builder uses the reload module, which is only available builtin in Python 2

So presumably, setting PYTHON_PATH to a python2 installation could work around this issue. I'll be trying that next

 

----

python이 3으로 깔려있는데 2가 필요한 경우가 있었다 함.

 

pyenv를 설치해주었으나 경로가 usr/bin/python으로 접속하고있음 이것을 pyenv를 타도록 변경 해주어야함.

아니면 해당 위치에 2.7 버전을 깔아주든가

 

전자의 방법이 스마트 해보이고 동적인듯 아래와 같이  해결했다.

빌드시 python_path 경로 입력!

PYTHON_PATH=/Users/PUT_YOUR_USER_HERE/.pyenv/versions/2.7.18/bin/python npm run electron:build

빌드 해결!

serve 실행시  동일문제 발생

.net 설치 확인 후  미설치시 설치해야겠음!

 

http://anyons.net/?p=2525 

 

mac에 dotnet 환경 설정 - 어느용

지금까지 개발을 .net 5.0 에서 해오다가 이번에 환경을 .net 6.0 으로 바꾸면서 mac 에서는 5.0 이하 버전의 .net 은 직접 설치를 해왔다. 그러다 6.0으로 바꾸면서 brew 를 사용해서 설치가 가능한것을

anyons.net

 

.NET 설치하니 해결!

 

> 정리

- python 경로 문제 (pyenv 설치 후 PYTHON_PATH에 경로 기재)

PYTHON_PATH=/Users/yongsinkwon/.pyenv/versions/2.7.18/bin/python npm run electron:serve

- .net 문제 

상단 링크 통하여 설치하여 정상작동 확인

댓글