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

flatpak-node-generator README: Mention XDG path of electron node headers #260

Merged
merged 1 commit into from Jun 27, 2022
Merged

flatpak-node-generator README: Mention XDG path of electron node headers #260

merged 1 commit into from Jun 27, 2022

Conversation

threema-danilo
Copy link
Contributor

I had to dig in the source code to find out that the path is different when --xdg-layout is set.

node/README.md Outdated Show resolved Hide resolved
@gasinvein gasinvein requested a review from refi64 April 27, 2022 09:40
@MrMYHuang
Copy link
Contributor

MrMYHuang commented Apr 30, 2022

Thank you. It works.
However, by my test, the ln command line should be run before npm install --offline. Otherwise, electron-builder will try to get Electron headers from Internet and fail with these errors:

    gyp http GET https://electronjs.org/headers/v16.2.3/node-v16.2.3-headers.tar.gz
    gyp WARN install got an error, rolling back install
    gyp ERR! configure error 
    gyp ERR! stack Error: getaddrinfo EAI_AGAIN electronjs.org
    gyp ERR! stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)

It could be related to https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules

# Install all dependencies, and store cache to ~/.electron-gyp.
HOME=~/.electron-gyp npm install

This is my flatpak manifest for reference:
https://github.com/flathub/io.github.mrmyhuang.cbetar2/blob/7c1e6c0c3f0084574398a9d17109630f28ba007e/io.github.mrmyhuang.cbetar2.yml

@MrMYHuang
Copy link
Contributor

MrMYHuang commented May 7, 2022

However, by my test, the ln command line should be run before npm install --offline.

Sorry, this was wrong. I thought it was so, because my npm install --offline triggered the package.json postinstall script to rebuild native module by electron-builder. This sentence is not true if removing the postinstall script.

Actually, by me tests, the ln command line shall be run before electron-builder rebuilds native modules. Not releated to run before or after npm install --offline.

node/README.md Outdated Show resolved Hide resolved
@gasinvein gasinvein merged commit 8401827 into flatpak:master Jun 27, 2022
@threema-danilo threema-danilo deleted the node-readme branch June 27, 2022 10:04
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

Successfully merging this pull request may close these issues.

None yet

4 participants