tzk init doesn't work for me
cpjobling opened this issue · comments
I have just tried to initialize a new Zettelkasten wiki on my Mac using the instructions provided. Here are my vital statistics:
MacOS Ventura 13.4.1
$python -v
Python 3.9.16 (main, Mar 8 2023, 04:29:44)
$tzk --version
tzk version 0.3.0
$npm --version
9.6.7
$git version
git version 2.41.0
My set up process was
$tzk preflight
You're all set! Change into a directory you want to turn into your tzk repository and run 'tzk init'.
$mkdir my-zettle-kasten
$cd my-zettle-kasten
The error message is:
$tzk init
tzk: Creating new tzk_config.py...
tzk: Creating new package.json...
tzk: Installing npm packages from package.json...
added 1 package, and audited 2 packages in 3s
found 0 vulnerabilities
tzk: Creating new TiddlyWiki...
Traceback (most recent call last):
File "/Users/eechris/anaconda3/bin/tzk", line 8, in <module>
sys.exit(launch())
File "/Users/eechris/anaconda3/lib/python3.9/site-packages/tzk/__main__.py", line 440, in launch
args._cls().execute(args)
File "/Users/eechris/anaconda3/lib/python3.9/site-packages/tzk/__main__.py", line 166, in execute
tw.install(args.wiki_name, args.tiddlywiki_version_spec, args.author)
File "/Users/eechris/anaconda3/lib/python3.9/site-packages/tzk/tw.py", line 197, in install
_init_tw(wiki_name)
File "/Users/eechris/anaconda3/lib/python3.9/site-packages/tzk/tw.py", line 117, in _init_tw
subprocess.check_call((_tw_path(), "--init", "tzk"))
File "/Users/eechris/anaconda3/lib/python3.9/site-packages/tzk/tw.py", line 21, in _tw_path
return _npm_bin() + "/tiddlywiki"
File "/Users/eechris/anaconda3/lib/python3.9/site-packages/tzk/tw.py", line 17, in _npm_bin
return subprocess.check_output(("npm", "bin"), text=True).strip()
File "/Users/eechris/anaconda3/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Users/eechris/anaconda3/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('npm', 'bin')' returned non-zero exit status 1.
I'll dig a bit more to see if I can find out what's happening on that last line. But maybe you have seen this before?
If it matters, node, npm, and git are all installed using homebrew. My Python is anacoda3 but installed as a homebrew cask.
Thanks, @sobjornstad. I'll do that. I think that I'll also write up the process that tzk init
goes through so that folks can work around it manually. Can I assume that the other tasks that the tzk CLI performs do work?
In the meantime, I used nvm (node version manager) to downgrade my installation of node and tzk init
di then work.
Should be fixed in new release 0.4.0.