Comments (11)
Thanks, now it works. I can now start zettlr from source 😄
from zettlr.
Hey there,
I cannot reproduce the windows error (I am currently on Win10 Pro x64 with node v8.9.4 and npm v5.6.0 installed), but from what I see the error is produced by the codemirror indentlist plugin postinstall script.
What this script basically does is simply to create an additional file in the plugin directory of the codemirror installation. According to a quick search ELIFECYCLE errors are thrown when there is an error in the script, which would point to two potential cases:
- the
patch
-command does not work, because the necessary package is not installed. Yet, it should be installed automatically on npm install, so I think this is highly unlikely. - There are insufficient write permissions to the
node_modules
-dir, meaning that thepatch
-command would fail because it is not allowed to write tonode_modules/codemirror
.
But I've on other occasions also noticed some complains about npm in general, so maybe try to update to npm v5.6.0 and try it again, maybe this will solve the issue.
As to your linux error, I cannot reproduce it as well, but only because I don't have a linux machine at hand currently. But the error code 126 from the postinstall-script seems to indicate write permission issues, as pointed to in this thread here.
A friend of mine has just tried to run the install scripts on linux (he's using Fedora) and it has worked there.
So I think the errors you are experiencing are pertaining to write permissions. Would you mind trying to clone the repository into your default Documents-folder in your Home directory and install without administrator-permissions in the shell? Maybe this will solve the issues.
Good luck!
from zettlr.
Hi @nathanlesage,
thanks for your quick answer.
I tryed to update npm to 5.6.0 and it changed something.
Also I try to run powershell with admin permission and one regular powershell and in both I got the same errors.
Do you have maybe installed some necessary packeges global?
Also I try it on a second PC (both with windows 10 x64) and on both I got this errors.
> [email protected] postinstall C:\temp\Zettlr\node_modules\codemirror-markdown-list-autoindent
> patch -p1 -d ../codemirror < markdown-list-autoindent.patch
Der Befehl "patch" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `patch -p1 -d ../codemirror < markdown-list-autoindent.patch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Der Befehl "patch" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
Means that the command "patch" is unkown or is writen wrong.
You can also have linux on windows. https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
In such a WSL it was possible for me to execute the npm install
command. But the npm start
command was not successful.
Linux Log:
> [email protected] start /mnt/c/temp/Zettlr
> electron .
/mnt/c/temp/Zettlr/node_modules/electron/dist/electron: error while loading shared libraries: libgtk
-x11-2.0.so.0: cannot open shared object file: No such file or directory
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `electron .`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Windows Log:
PS C:\temp\Zettlr> npm start
> [email protected] start C:\temp\Zettlr
> electron .
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn C:\temp\Zettlr\node_modules\electron\dist\electron ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:686:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
from zettlr.
Ah, this logging output helps better! I think now we can solve both of your problems!
Der Befehl "patch" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
So indeed somehow the patch command does not work.
On windows I try npm install
through the normal shell and I think this may solve it. I dislike PowerShell because many commands need to be explicitly routed to their correct aliases. So the German output definitely comes from PowerShell and not from node itself (b/c node is always en_US), which points to the problem that the patch command cannot be referenced from within PowerShell. I'd advise you to simply use the normal shell for npm, because this definitely works.
As to your Linux problem, I believe this is because of the Linux subsystem. As the subsystem only implements shell commands and stuff, not the graphical interface (i.e. the X11-server), this means that running a graphical program such as electron is not possible using the subsystem. This is also indicated in your logging output as it references a missing dependency libgtk-x11-2.0.so.0
. This basically tells you "I couldn't find the GTK interface!" (libgtk-x11 is the main library for running graphical programs on a GTK platform such as Ubuntu or Gnome).
I think you definitely need a Virtual Machine if you like to be running an electron app on your windows machine. You could try VirtualBox, because many people I've talked to mentioned it for running Linux systems on a Windows PC (and vice versa), so it should be a good point to start.
Please tell me if it works now!
from zettlr.
Ok build now works and start also but after npm start
the app creshed because it could not pars some files from my local Documents folder. But I don't understand why the app try to pars my files at startup?
from zettlr.
This is just as intended.
When Zettlr starts, it needs at least one root directory, and if there hasn't been any, it defaults back to your documents folder. Then it parses the whole directory and reads in all *.txt and *.md files, opens them for read, extracts some information (such as creation date and the first 50 characters) so that it can present to you an initial list of files.
Then you can, from within the app, choose a different folder, if you wish to. Could you please provide some error information?
from zettlr.
How can I provide an other root dir at startup?
Unfortunatelly I can't upload screenshots here. I got an popup windows with a stacktrace and can't copy the text.
Edit: now I know how to upload screenshots here :D
from zettlr.
from zettlr.
… well, that is an interesting error, if even node doesn't know what to do. It shouldn't happen, so I will look into it. But I think it's because of a symlink that Zettlr shouldn't be following.
As for now, until it's fixed, you can find the configuration of Zettlr in C:\Users\<your-username>\AppData\Roaming\Zettlr\config.json
There, simply replace the JSON variable projectDir
with a safe directory and try to start the app again.
from zettlr.
Good to hear! I'll try to fix the startup error in a next version, though =D
from zettlr.
See for further discussion on these problems issue #14.
from zettlr.
Related Issues (20)
- Ordered sublists/nested lists switching to a. b. c. and i. ii. iii. HOT 7
- Nested ordered lists continue from the previous numbering
- Current Import Workflow is Intransparent
- Canceled HOT 1
- [Enhancement] (Option to) hide markup annotations for headers / titles HOT 2
- Light mode has too little contrast between text and background in the panes. HOT 3
- Changing the file filtering logic for match-query to AND instead of OR
- [develop] Replace the current YAML frontmatter parser with `parseMixed`
- Youtube embed HOT 6
- Impossible to export files on Flatpak builds HOT 1
- Strikethrough formatting does not work in a tables
- Name auto-complete (add display name option) does not work when linking with ID HOT 3
- Links to internal pages not recognized as internal when in markdown style
- Some files do not show * when edited and do not save or autosave, no warning when renaming that buffer data will be lost HOT 21
- Display modified/not-saved status (asterisk in usual editor) in Distraction-Free Mode
- Pandoc export fail when use wikilinks_title_after_pipe or wikilinks_title_before_pipe HOT 3
- Toggle sidebar shortcut not working 3.1.0-beta.2 HOT 3
- Please add more syntax highlighters (Pascal, EBNF) HOT 1
- I18n bug: files with duplicate names are overwriten during extracting vue files HOT 2
- Option to create new files in the currently open workspace / in a folder selected in options rather than in a default folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zettlr.