-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Nativefier 8.0.0-8.0.3 fails to sudo-globally-install, with permission error in postinstall script #923
Comments
@BananaManCJ thanks. Confirmed at #719 (comment) . Looking, all help / ideas / additional debug info welcome. |
I'm having the same problem with Ubuntu 19.10 Gnome. Maybe is something specific with Ubuntu? 🤔 |
I can check to see if this is a Ubuntu-specific issue, I have a Mac |
@BananaManCJ yes please, on my side looking on a Windows machine. Thanks 🙏. |
Can confirm that the error occurs on MacOS |
It outputs more information on MacOS Output: npm ERR! A complete log of this run can be found in: |
On my side,
Using yarn to bundle the electron app was added with 8.x, after long discussion summed up at #898 (comment) . Trying to see if we can make this work, of considering coming back to Webpacking the app 😕. |
It shows this yarn error here too. I'm installing Fedora 31 here, and I'll try again... |
@raulcraveiro @BananaManCJ can you try installing with environment variable |
Just tried, got the same error :/ @ronjouch |
On Linux or MacOS @ronjouch |
@BananaManCJ both welcome. Thanks 🙂. |
WOAH, got a bigger error message this time |
@BananaManCJ yeah, samed as the one I got in a Docker:
|
I don't see a /root/.config/yarn folder on my system, am I missing a dependency? |
@BananaManCJ nope, you're good, the problem is on yarn, not you. I'm preparing a workaround, keeping you posted. |
Just tried on Fedora 31, getting the same error :/ |
@BananaManCJ @raulcraveiro I published a workaround, can you give it a try? The workaround will introduce a 60s delay at installation time, but give it time and it should finish. Waiting for your feedback. EDIT gaaaah, maybe not actually, I get this error in my Ubuntu 19.10 Docker. Well, give it a try anyway if you have the time, maybe it works for you.
|
I got this error: ` npm ERR! A complete log of this run can be found in: |
@ronjouch I get the same error, I think @raulcraveiro forgot to run npm as root |
I also tried running Edit: also in 8.0.0 |
Okay yes, still broken. My understanding so far:
So, I'm going to sleep on that, and next week I'll revert back to Thanks for the feedback everybody! |
No problem! |
Thank you for the attention! If you need any help testing on Ubuntu, I can help ;) |
Getting the same issue in macOS with ohmyzsh. Here's the log file: |
@BananaManCJ @raulcraveiro @remissao @cwensel issue should be fixed in Nativefier 8.0.4 just published on npm! Confirmed working in my Ubuntu 19.10 docker. Please |
It worked! Thank you so much ;) |
@raulcraveiro yayyyyy welcome 🙂. Thank you and thanks everyone here for the feedback! |
D:\Desktop\native>npm install nativefier -g npm ERR! A complete log of this run can be found in: D:\Desktop\native> This is why?? |
…ivefier#923) As documented in nativefier#923 (comment) , - nativefier#923 is caused by installing placeholder app deps at nativefier *install* time, with yarn (8.0.2) or npm (8.0.3). This is new in Nativefier 8.x, for the motivations behind it, see nativefier#898 (comment) - During testing, I did test global installs, but never to a system / non-user-writable path (my `$npm_config_prefix` is set to `"$HOME/.node_modules"`) - But without such a config and when installing globally to a non-user-writable/system path with `sudo npm i -g nativefier`, - Installation of nativefier core works... - ... but then `postinstall` tries to do its job of installing app deps, and fails in various OS-dependent ways, but all about access rights. I suspect that, although main nativefier install runs as `su` with access rights to system paths, `postinstall` scripts are run *out* of `su`. That would make sense for security reasons: out of hook scripts, npm knows exactly what will be touched in your filesystem: it's the static contents of the published tarball; a postinstall script with sudo rights could do nasty dynamic stuff. So, although I don't see any mention of that in [npm-scripts docs / hooks](https://docs.npmjs.com/misc/scripts#hook-scripts) and I haven't dug npm/cli's code, I can understand it. So, reverting back to `webpack`ing the placeholder app, as done pre-8.0.
EDIT from maintainer @ronjouch: see #923 (comment) for details. I'm working on a fix (probably reverting to
webpack
ing the placeholder app at build time, see #898 (comment)). Until then, you should:npm install nativefier
, then invoke it withnode ./node_modules/.bin/nativefier <your-options-here>
)...npm_config_prefix
to somewhere user-writable andnpm install -g nativefier
withoutsudo
.I am trying to install Nativefier and it keeps failing. I am on Lubuntu 19.10, have the latest verison of nodejs and npm.
Error in terminal:
Log:
2020-03-15T23_58_29_502Z-debug.log
The text was updated successfully, but these errors were encountered: